Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NumberControl to support min/max font size for Tag Cloud Block #37311

Merged

Commits on Mar 21, 2022

  1. Add NumberControl to support min/max font size for Tag Cloud Block

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    38a48ed View commit details
    Browse the repository at this point in the history
  2. Regenerate fixtures for tag-cloud block

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    09c1447 View commit details
    Browse the repository at this point in the history
  3. address review comment

    In this commit, I have addressed following  comments:
    1. fix label of the NumberControl field
    2. add min and max value of NumberControl field
    3. Wrap NumberControl fields inside flex to make UI consistent
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    13bb226 View commit details
    Browse the repository at this point in the history
  4. Remove space in label

    Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>
    2 people authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    a02a212 View commit details
    Browse the repository at this point in the history
  5. Remove space from label of smallest size input field

    Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>
    2 people authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    c54a671 View commit details
    Browse the repository at this point in the history
  6. add smallestFontSize and largestFontSize in core blocks docs

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    e130109 View commit details
    Browse the repository at this point in the history
  7. fix NumberControl typecasting issue

    This commit is done inorder to fix type issue since NumberControl returns
    string and because of that It was not able to render font size properly.
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    d552757 View commit details
    Browse the repository at this point in the history
  8. change font size units from pt to px

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    476b9b5 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9258ba4 View commit details
    Browse the repository at this point in the history
  10. replace NumberControl with InputControl

    this is done to be in sync with the UI illustrations and UI design pattern
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    cbc3f2d View commit details
    Browse the repository at this point in the history
  11. add new attribute fontSizeUnit

    In this commit, a new attribute is introduced to select different font unit
    example `px` or `pt`. Core blocks docs is also updated
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    b48db09 View commit details
    Browse the repository at this point in the history
  12. replace InputControl with UnitControl

    In this commit, `UnitControl` component is used to configure smallestFontSize
    and largestFontSize. UnitControl offers input field with a select html tag.
    `fontSizeUnit` single attribute is used to keep unit in both the fields in sync
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    f99b43b View commit details
    Browse the repository at this point in the history
  13. update wp_tag_cloud args to handle fontSizeUnit

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    231433e View commit details
    Browse the repository at this point in the history
  14. fix unit test

    test cases were failing because of new attribute `fontSizeUnit`. It is fixed now.
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    795a080 View commit details
    Browse the repository at this point in the history
  15. change smallestFontSize and largestFontSize attribute to string

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    fb7b01f View commit details
    Browse the repository at this point in the history
  16. add condition to update font unit

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    d646f06 View commit details
    Browse the repository at this point in the history
  17. extract font unit from integer fontSize attribute

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    e50e654 View commit details
    Browse the repository at this point in the history
  18. remove fontSizeUnit attribute

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    4f442ad View commit details
    Browse the repository at this point in the history
  19. fix test cases after removing fontSizeUnit and str (smallest/larges…

    …t)FontSize
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    ec927f3 View commit details
    Browse the repository at this point in the history
  20. fix php lint errors

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    aaa245a View commit details
    Browse the repository at this point in the history
  21. implement useCustomUnits hooks to support different units

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    b0a8504 View commit details
    Browse the repository at this point in the history
  22. add addFontChange common function for (smallest/largest)FontSize

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    7d25c13 View commit details
    Browse the repository at this point in the history
  23. use preg_replace to handle font unit and pass integer font size `wp…

    …_tag_cloud`
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    9832036 View commit details
    Browse the repository at this point in the history
  24. refactor onFontChange function to onFontSizeChange function

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    22cc30e View commit details
    Browse the repository at this point in the history
  25. tag-cloud block php handle decimal values unit property

    given a comment to handle decimal value case when passed to `unit`
    property. I updated the regex to `/^\d*\.?\d*/`. This regex can parse
    values like `123.3px` or `.33px` or `123px`.
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    27e4591 View commit details
    Browse the repository at this point in the history
  26. write descriptive variables names

    Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
    2 people authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    a74ec71 View commit details
    Browse the repository at this point in the history
  27. rename parseUnit to parseQuantityAndUnitFromRawValue

    Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
    2 people authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    aff4e19 View commit details
    Browse the repository at this point in the history
  28. rename parseUnit import name

    Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
    2 people authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    39b4fef View commit details
    Browse the repository at this point in the history
  29. rename parseUnit to parseQuantityAndUnitFromRawValue

    Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
    2 people authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    31fb6b5 View commit details
    Browse the repository at this point in the history
  30. Apply suggestions from code review

    Fix formatting
    ciampo authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    95f6a19 View commit details
    Browse the repository at this point in the history
  31. fix: security vulnerability add validate unit method for `wp_tag_clou…

    …d` args
    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    02c11b7 View commit details
    Browse the repository at this point in the history
  32. fix php lint error using composer format command

    amustaque97 authored and Mustaque Ahmed committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    db24fd3 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    b821645 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2022

  1. Configuration menu
    Copy the full SHA
    faef8d8 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2022

  1. change MIN_FONT_SIZE to 0.1

    Co-authored-by: Nik Tsekouras <ntsekouras@outlook.com>
    amustaque97 and ntsekouras authored Mar 23, 2022
    Configuration menu
    Copy the full SHA
    059357a View commit details
    Browse the repository at this point in the history