-
Notifications
You must be signed in to change notification settings - Fork 793
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(component-index): 1555-component-index-filter-ui-functionality #1584
feat(component-index): 1555-component-index-filter-ui-functionality #1584
Conversation
This pull request is being automatically deployed with Vercel (learn more). undefined – ./🔍 Inspect: https://vercel.com/carbon-design-system/carbondesignsystem/epilspahd |
This pull request is being automatically deployed with Vercel (learn more). carbon-website – ./🔍 Inspect: In Progress carbondesignsystem – ./🔍 Inspect: In Progress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its looks good, its needs a few tweaks though.
-
The left page alignment is off.
As-is:
To-be:
The type should be inset and the search and tiles should be the things that hang. This is similar to the alignment like on the Icon library page.
-
The border between cards shouldn't just be a space. It actually needs to be a color (gray20, $ui-03). The resource cards on the website will have this same treatment
-
The bottom of the cards are breaking at around 1060px screen size. Can we just drop the maintainer tag when they start getting close? Is that possible or do wee need to figure out a wrap of some sort?
-
It looks like there's a little extra space around the maintainer tags and is causing it items on the bottom to sit a little high. The framework and maintainer tag are also misaligne.
- In mobile the cards should be flush to edge. Looks like its got about 32px on both sides right now.
- The notification at the top of the page should actually go below the intro text to be consistent with how it place it else where.
… soft launch preview
.map((value) => (value === 'Cloud Data & AI' ? 'CD&AI' : value)), | ||
}; | ||
|
||
const filterFunction = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to pull this into the outer scope and provide the selected options 👀 Maybe something like:
function filterItems(items, filters) {
// ...
}
And then later on it becomes:
results = (
<ComponentIndexList
items={
filterItems(searchOptions.slice(), selected)
.sort(sortBy[activeSortOption])
}
/>
);
filterItems
could look like:
function filterItems(items, filters) {
return items.filter(item => {
// If there are no filters, return true
if (filters.length === 0) {
return true;
}
const { framework, designAsset, availability, maintainer } = item;
const fields = [framework, designAsset, availability, maintainer];
return filters.every(filter => {
return fields.includes(filter);
});
});
}
In it, the idea is that you go through every item to be displayed and grab the relevant fields to be filtered by. The AND operation is the filters.every
bit, in other words for every filter we need to see if the item has the corresponding field available.
…te into 1555-component-index-filter-ui-functionality
Co-authored-by: Josh Black <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, looks awesome!
@andreancardona just saw the review re-request, still had those comments from above but beside that should be good 👍 |
Side-note, do we want to add it to the side nav with this PR? @aagonzales @andreancardona ? |
….com:andreancardona/carbon-website into 1555-component-index-filter-ui-functionality
The search filter styles are different than we have on the icon search page. @aagonzales should we try and normalize them? Our search pattern shows dropdowns inline. |
@vpicone Its purposefully different. The icons dropdown is a sub category of search. In the index sort is a different function and didn't make sense to be inline with search. It also throws off page alignment. The design team talked it through awhile ago and Mike was also involved. We could normalize the border bottom however. And make it the lighter gray in the index. |
@aagonzales okay thanks for clarifying, let me know if we'd rather have the index use the darker border. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small change but otherwise it looks awesome, @andreancardona!! 🎉
Co-authored-by: jillianhowarth <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the border, but we can always tweak that later.
Looks good to me once search and dropdown are the same height!
…arbon-design-system#1584) * feat(component-index): 1555-component-index-filter-ui-functionality * all design updates done - except grid * responsive breakpoints updated - need to fix left grid alignment * feat(component-index): 1555-component-index-filter-ui-functionality - soft launch preview * things working * feat(component-index): all features should be working * updated filter refactor * feat(component-index): 1555-component-index-filter-ui-functionality - soft launch * Update src/components/ComponentIndexPage/index.js Co-authored-by: Josh Black <[email protected]> * feat(component-index): redirect, and css updates * feat(component-index): deleted components mdx file * Update src/data/nav-items.yaml Co-authored-by: jillianhowarth <[email protected]> Co-authored-by: andrea.cardonaibm.com <andrea.cardonaibm.com> Co-authored-by: Josh Black <[email protected]> Co-authored-by: Vince Picone <[email protected]> Co-authored-by: jillianhowarth <[email protected]>
…arbon-design-system#1584) * feat(component-index): 1555-component-index-filter-ui-functionality * all design updates done - except grid * responsive breakpoints updated - need to fix left grid alignment * feat(component-index): 1555-component-index-filter-ui-functionality - soft launch preview * things working * feat(component-index): all features should be working * updated filter refactor * feat(component-index): 1555-component-index-filter-ui-functionality - soft launch * Update src/components/ComponentIndexPage/index.js Co-authored-by: Josh Black <[email protected]> * feat(component-index): redirect, and css updates * feat(component-index): deleted components mdx file * Update src/data/nav-items.yaml Co-authored-by: jillianhowarth <[email protected]> Co-authored-by: andrea.cardonaibm.com <andrea.cardonaibm.com> Co-authored-by: Josh Black <[email protected]> Co-authored-by: Vince Picone <[email protected]> Co-authored-by: jillianhowarth <[email protected]>
Closes #1555
Updates
This is the final step for a soft release on the component filter. This PR should have the following functionality:
Filter by different categories
Filter and sort different categories
Match the following filter