Skip to content

Expose styling of facet headers in FilterGroup #321

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

Merged
merged 4 commits into from
Nov 7, 2022

Conversation

tatimblin
Copy link
Contributor

add env to gitignore

J=SLAP-2428
TEST=auto,manual

served site with custom label class added. toggled collapsible

@tatimblin tatimblin requested a review from a team as a code owner November 1, 2022 20:27
@coveralls
Copy link

coveralls commented Nov 1, 2022

Coverage Status

Coverage increased (+0.03%) to 85.428% when pulling c24b9dc on dev/filtergroup-css into c24ae51 on develop.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

Current unit coverage is 88.53211009174312%
Current visual coverage is 77.50533049040511%
Current combined coverage is 89.06727828746178%

Copy link
Contributor

@nmanu1 nmanu1 left a comment

Choose a reason for hiding this comment

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

can the base branch of the PR be changed to develop?

@tatimblin tatimblin requested a review from nmanu1 November 2, 2022 13:24
@tatimblin tatimblin requested a review from yen-tt November 2, 2022 15:50
@tatimblin tatimblin changed the base branch from main to develop November 2, 2022 16:06
@tatimblin tatimblin requested a review from nmanu1 November 2, 2022 19:27
@tatimblin tatimblin requested a review from nmanu1 November 3, 2022 13:11
@oshi97
Copy link
Contributor

oshi97 commented Nov 3, 2022

could you resolve the merge conflict?

@tatimblin tatimblin force-pushed the dev/filtergroup-css branch 2 times, most recently from 25d4334 to 4786e9f Compare November 3, 2022 16:46
@tatimblin tatimblin force-pushed the dev/filtergroup-css branch from 4786e9f to fd80547 Compare November 3, 2022 16:48
@@ -75,11 +79,21 @@ export function FilterGroup({
};
}, [customCssClasses]);

const replicateCollapsibleLabelCssClasses = useMemo(() => {
Copy link
Contributor

@oshi97 oshi97 Nov 4, 2022

Choose a reason for hiding this comment

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

We shouldn't need two useMemo usages here, I think we can combine them if we change the replicateCollapsibleLabelCssClasses usage below to collapsibleLabelCssClasses.label?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I am now doing the merge directly on the className

@@ -75,11 +79,21 @@ export function FilterGroup({
};
}, [customCssClasses]);

const replicateCollapsibleLabelCssClasses = useMemo(() => {
return twMerge('mb-4', builtInCollapsibleLabelCssClasses.label, cssClasses.titleLabel);
Copy link
Contributor

@oshi97 oshi97 Nov 4, 2022

Choose a reason for hiding this comment

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

Is it necessary to pass builtInCollapsibleLabelCssClasses here? CollapsibleLabel calls useComposedCssClasses with it's own buitlInCssClasses which I think would handle this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

builtInCollapsibleLabelCssClasses is needed because that is an export from CollapsibleLabel. This helps replicate the title labels style wether collapsible or not

: (title &&
<div className='text-neutral-dark text-sm font-medium text-left mb-4'>
<div className={twMerge('mb-4', builtInCollapsibleLabelCssClasses.label, collapsibleLabelCssClasses.label)}>
Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking we could put this in the useMemo like label: twMerge('mb-4', builtInCollapsibleLabelCssClasses.label, collapsibleLabelCssClasses.label) and then have this be className={collapsiblelabelCssClasses.label} but it's ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

builtInCollapsibleLabelCssClasses comes from CollapsibleLabel so I don't want to merge it back into collapsibleLabelCssClasses because then it'll merge in twice

@tatimblin tatimblin merged commit 99a9542 into develop Nov 7, 2022
@tmeyer2115 tmeyer2115 mentioned this pull request Dec 15, 2022
tmeyer2115 added a commit that referenced this pull request Dec 15, 2022
### Features
- Default behavior of `FilterSearch` was changed to better support Locators and Doctor Finders. Additionally, a new `onSelect` prop was added to the Component. The `searchOnSelect` prop is now deprecated.  (#323, #343, #333)
- A new CSS bundle without the Tailwind resets is exported. (#322)
- We've added a `MapboxMap` Component, powered by v2 of their JavaScript API. (#332)

### Changes
- Assorted updates to improve our GH Actions. 
- Styling of Facet Headers is now exposed in `FilterGroupCssClasses`. (#321)

### Bug Fixes
- Vulnerabilities were addressed for the repo and its test-site. 
- Fixed the Dropdown Component to invoke `preventDefault` only when it is active. (#307)
- Corrected a small error in the generation of SSR Hydration IDs. (#315)
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.

5 participants