-
Notifications
You must be signed in to change notification settings - Fork 76
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: Add tags to info sidebar of library component [FC-0062] #1299
feat: Add tags to info sidebar of library component [FC-0062] #1299
Conversation
Thanks for the pull request, @ChrisChV! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1299 +/- ##
==========================================
+ Coverage 92.47% 92.72% +0.25%
==========================================
Files 1025 1036 +11
Lines 18976 19351 +375
Branches 3977 4036 +59
==========================================
+ Hits 17548 17944 +396
+ Misses 1363 1343 -20
+ Partials 65 64 -1 ☔ View full report in Codecov by Sentry. |
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.
LGTM 👍
Thank you for your work @ChrisChV !
- I tested this using the instructions from the PR
- I read through the code
- I checked for accessibility issues
- Includes documentation
I left some comments/suggestions.
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.
If you have some time, could you please update these tests to use the mock API instead of mocking the hooks?
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.
Sure, let me check 👍
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.
Updated: a505f8c
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.
@ChrisChV Can you please just add a test that covers the code in tagsCount
? And then I'll approve + merge this for you.
@@ -86,6 +87,9 @@ describe('<ContentTagsDrawer />', () => { | |||
isError: false, | |||
mutate: mockMutate, | |||
}); | |||
useParams.mockReturnValue({ | |||
contentId, | |||
}); |
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.
Note that you can use the new testUtils
to pass actual react-router params instead of mocking, if you want:
frontend-app-authoring/src/testUtils.tsx
Line 62 in b6ec5e1
* render(<LibraryLayout />, { path: '/library/:libraryId/*', params: { libraryId: 'lib:Axim:testlib' } }); |
Might be too big of refactor to bother with now though; just making sure you're aware :)
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.
return ( | ||
<div> | ||
{ tagsByTaxonomy.map((data) => ( | ||
<div key={`taxonomy-tags-collapsible-${data.id}`}> |
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.
Nit: React key
s aren't rendered into the DOM and don't have to be globally unique; just unique within this parent element. So <div key={data.id}>
would be perfectly fine.
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.
Updated: ff7bd2a
Note: I deployed this to the sandbox, because I think it's ready to go other than needing slightly more test coverage. |
@bradenmacdonald It's ready for another review and merge |
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.
Nice work @ChrisChV. Thanks for refactoring those test cases!
Description
This:
drawer
(default) andcomponent
variants forContentTagsDrawer
.ContentTagsDawer
in the info sidebar of library components.Supporting information
Github Issue: #1286
Internal ticket: FAL-3847
Testing instructions
Manage
tab.ContentTagsDrawer
is rendered. Click onManage tags
and add some tags. Save.ContentTagsDrawer
(add more tags, delete tags, etc)