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: LEAP-1020: Relation side panel improvements #5711
base: develop
Are you sure you want to change the base?
Conversation
👷 Deploy request for label-studio-docs-new-theme pending review.Visit the deploys page to approve it
|
👷 Deploy request for heartex-docs pending review.Visit the deploys page to approve it
|
@Precious-Macaulay thank you, this PR looks really good and well-thought! I'll check it live soon and we have to run it through our internal processes. One small comment right now — new files have too big indent, we use 2 spaces everywhere, but that's just a linting issue. |
Thanks for the feedback! I'll make sure to adjust the indentations accordingly to match the 2-space standard. |
There is our internal ticket for this PR: https://humansignal.atlassian.net/browse/LEAP-1020 |
I committed a fix for this |
Alright |
@hlomzik any update on this |
web/libs/editor/src/components/SidePanels/DetailsPanel/Relations.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: bmartel <[email protected]>
Apologies for the oversight. The use case was intended to prevent unnecessary re-renders, which is typically achieved using `useMemo` rather than `useCallback`. However, considering it is a reactive property, employing either may be superfluous. Co-authored-by: bmartel <[email protected]>
Thanks for making those changes @Precious-Macaulay! I noticed a few discrepancies in formatting when going over the code again. Would you be able to run the formatter/linter locally and push the changes up? cd web && yarn run biome check --apply . |
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.
Thanks for making those changes @Precious-Macaulay! I noticed a few discrepancies in formatting when going over the code again. Would you be able to run the formatter/linter locally and push the changes up?
cd web && yarn run biome check --apply .
Yes, I have fixed the formatting and resolved the linting issues.
Overview
This PR implements improvements to the relations list based on the accepted [prd: Relations list improvements]
See #5689 #5447 #5446
2024-04-07.mp4
Changes
Relations list ordering
Relations visibility toggle
Testing
PR Requirements
Areas Impacted
Change Details
This is a new feature implementing relations list ordering and visibility toggling based on the provided requirements.
No libraries were added or updated.
This change should have a positive performance impact by allowing users to easily focus on relevant relations.
This change does not impact security.
Alternatives were manually hiding relations and scrolling down which is tedious.
No feature flags were used.
Breaking Change
Testing
Affected Domains
Acceptance Criteria
Adds options to order relations list by creation time (ascending and descending)
Persists ordering preference between sessions
Integration test for ordering functionality
Adds a toggle icon next to "Relations" label
Toggle hides all relations when one or more are visible
Toggle shows all relations when all are hidden
Persists visibility state between sessions
Integration tests for visibility functionality
Closes #5689 #5447 #5446