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

feat: Property filter token groups #2626

Merged
merged 9 commits into from
Sep 17, 2024
Merged

feat: Property filter token groups #2626

merged 9 commits into from
Sep 17, 2024

Conversation

pan-kot
Copy link
Member

@pan-kot pan-kot commented Aug 28, 2024

Description

Making property filter token groups API public. The PR also includes small changes to default popover position, alignment and border radius of nested tokens, dev-warning for hide-tokens.

Depends on:

Related changes:

Rel: [HJhfABYOa8OE]

How has this been tested?

  • Screenshot tests
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

scripts/install-peer-dependency.js Fixed Show resolved Hide resolved
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.89%. Comparing base (5b75ec3) to head (2c11b0f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2626      +/-   ##
==========================================
+ Coverage   95.87%   95.89%   +0.02%     
==========================================
  Files         748      748              
  Lines       20730    20719      -11     
  Branches     7006     7056      +50     
==========================================
- Hits        19874    19869       -5     
- Misses        800      842      +42     
+ Partials       56        8      -48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -14,6 +14,8 @@ $token-grouped-padding-block: 2px;
$token-grouped-padding-inline: styles.$control-padding-horizontal;
$inner-token-padding-block: 1px;
$inner-token-padding-inline: styles.$control-padding-horizontal;
$border-radius-token: awsui.$border-radius-token;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we redeclare it here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for consistency with border-radius-inner-token

Comment on lines +61 to +64
border-start-start-radius: $border-radius-inner-token;
border-start-end-radius: $border-radius-inner-token;
border-end-start-radius: $border-radius-inner-token;
border-end-end-radius: $border-radius-inner-token;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we do it this way and not just use border-radius: $border-radius-inner-token;?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The border-radius is banned by stylelint because of RTL.

@@ -42,12 +52,18 @@ const PropertyFilter = React.forwardRef(
},
};

if (hideOperations && enableTokenGroups) {
warnOnce('PropertyFilter', 'Operations cannot be hidden when token groups are enabled.');
hideOperations = false;
Copy link
Member

@michaeldowseza michaeldowseza Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't normally edit values that have been provided to us as it can be confusing for the developer that they provided one value but the component then does not respect that value. Is a warning not enough here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is not really editing as there is no mutation involved. By assigning this to false we ensure the value is ignored. We do use a similar approach here: https://github.com/cloudscape-design/components/blob/main/src/date-range-picker/index.tsx#L237

Copy link
Member

@michaeldowseza michaeldowseza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few general questions.

@pan-kot pan-kot added this pull request to the merge queue Sep 17, 2024
Merged via the queue into main with commit fdad04b Sep 17, 2024
33 checks passed
@pan-kot pan-kot deleted the pfg-phase-1-new4 branch September 17, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants