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: LEAP-1020: Relation side panel improvements #5711

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

Precious-Macaulay
Copy link

@Precious-Macaulay Precious-Macaulay commented Apr 10, 2024

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

  • Added ordering options to relations list sidepanel
  • Ordering by creation time (ascending or descending)
  • Ordering preference persists between sessions

Relations visibility toggle

  • Added toggle icon next to "Relations" label
  • Toggle hides all relations when one or more are visible
  • Toggle shows all relations when all are hidden
  • Visibility state persists between sessions

Testing

  • Added unit tests for ordering and visibility functionality
  • Updated documentation with usage instructions

PR Requirements

  • Commit message(s) and PR title follows the format
  • Tests for the changes have been added/updated
  • Docs have been added/updated
  • Best efforts for concise/coherent code

Areas Impacted

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

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

  • Yes, and covered entirely by feature flags
  • Yes, and covered partially by feature flags
  • No
  • Not sure

Testing

  • e2e
  • integration
  • unit

Affected Domains

  • Relations Details Panel

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

Copy link

netlify bot commented Apr 10, 2024

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 96d143d

Copy link

netlify bot commented Apr 10, 2024

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 96d143d

@github-actions github-actions bot added the feat label Apr 10, 2024
@Precious-Macaulay
Copy link
Author

@deppp @hlomzik @jombooth do you mind checking the code?
I have improved the code and added integration test ( #5694 )

@hlomzik
Copy link
Collaborator

hlomzik commented Apr 17, 2024

@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.

@Precious-Macaulay
Copy link
Author

Thanks for the feedback! I'll make sure to adjust the indentations accordingly to match the 2-space standard.

@makseq
Copy link
Member

makseq commented Apr 17, 2024

There is our internal ticket for this PR: https://humansignal.atlassian.net/browse/LEAP-1020

@Precious-Macaulay
Copy link
Author

@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.

I committed a fix for this

@Precious-Macaulay
Copy link
Author

There is our internal ticket for this PR: https://humansignal.atlassian.net/browse/LEAP-1020

Alright

@makseq makseq requested a review from hlomzik April 18, 2024 15:39
@Precious-Macaulay
Copy link
Author

@hlomzik any update on this

@Precious-Macaulay Precious-Macaulay changed the title feat: Relation side panel improvements (#5689) feat: LEAP-1020: Relation side panel improvements Apr 26, 2024
Precious-Macaulay and others added 5 commits May 1, 2024 17:20
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]>
@bmartel
Copy link
Contributor

bmartel commented May 2, 2024

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 .

Copy link
Author

@Precious-Macaulay Precious-Macaulay left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prd: Relation side panel improvements
4 participants