Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

fix: LEAP-461: Fix displaying conditions for comments tab #1650

Merged
merged 7 commits into from
Jan 9, 2024

Conversation

Gondragos
Copy link
Contributor

@Gondragos Gondragos commented Dec 27, 2023

Comments tab disappeared on the screen resizing.
This is a fix for conditions for filtering set of tabs in sidebar in two different modes of displaying this sidebar.

PR fulfills these requirements

  • Tests for the changes have been added/updated
  • Docs have been added/updated
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance

Describe the reason for change

There are two approaches for rendering tabs with the actual set of feature flags.

  1. for the wide screens. We just use sidebartabs weth docking and drag&dropable tabs.
  2. for the narrow screens we just display everything at the bottom.

The first problem was that this 2 approaches used different conditions. So that we had wrong set of available tabs.

The second problem was in the way we throw the conditions from the interface settings through the bunch of levels of components. Semantically it was wrong according to naming so it was a mess.

This change affects (describe how if yes)

  • Performance
  • Security
  • UX

Does this PR introduce a breaking change?

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

  • e2e (codecept)
  • integration (cypress)
  • unit (jest)

Which logical domain(s) does this change affect?

Sidebar, Comments, Interfaces

@codecov-commenter
Copy link

codecov-commenter commented Dec 27, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (88ba15c) 68.27% compared to head (7dc18d9) 68.25%.
Report is 8 commits behind head on master.

Files Patch % Lines
src/components/SidePanels/TabPanels/utils.ts 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1650      +/-   ##
==========================================
- Coverage   68.27%   68.25%   -0.03%     
==========================================
  Files         443      443              
  Lines       28690    28690              
  Branches     7633     7630       -3     
==========================================
- Hits        19589    19581       -8     
- Misses       7849     7857       +8     
  Partials     1252     1252              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Gondragos and others added 4 commits December 27, 2023 17:09
- initial state for panels calculated only once
- simpler iterations
- export helpful types
- correct inferring
@Gondragos Gondragos merged commit 083812f into master Jan 9, 2024
15 checks passed
@Gondragos Gondragos deleted the fb-leap-461/comments branch January 9, 2024 18:54
MasherJames pushed a commit to HelloPareto/label-studio-frontend that referenced this pull request Feb 29, 2024
…l#1650)

* fix: LEAP-461: Fix displaying conditions for comments tab

* Fix another condition

* Describe conditions when we return default state

* Fix typings and improve code

- initial state for panels calculated only once
- simpler iterations
- export helpful types
- correct inferring

* Remove comment about impossible case

* Update ls-test dependency

---------

Co-authored-by: hlomzik <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants