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

fix: LEAP-1409: Add preserving hidden filters during filter operations #6782

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Gondragos
Copy link
Collaborator

Ensure hidden filters are retained and correctly processed in filter-related operations. Introduced _originalFilters to store and manage filters not editable by the user, preventing their loss during requests.

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • 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 (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

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

Describe the reason for change

We have columns in Data Manager. For some user roles the list of columns is reduced. We can have filters over these columns set by other users. But we cannot do anything with these filters as they are dependent on the non existing for the current user columns.

The previous solution was just filter this filters out of the models. But this approach causes the problem: we do not save this filtered out filters when we adding / deleting / editing other filters an columns.

Storing these filtered out filters somewhere and restoring them on creating a request should help with that.

What alternative approaches were there?

  1. Solve this on the backend. But we may lose consistency and orderliness. There is not enough control.
  2. We could keep these filters in the model but just hide them. In that case we have problem with fixing current logic, that was written with assuming that we do not need these filters and everything else, related to them (f.e. colums in the model). It's hard to fixx all places like that.

Does this PR introduce a breaking change?

(check only one)

  • 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?

(check all that apply)

  • e2e
  • integration
  • unit

Which logical domain(s) does this change affect?

Data Manager, 'Filers'

Ensure hidden filters are retained and correctly processed in filter-related operations. Introduced `_originalFilters` to store and manage filters not editable by the user, preventing their loss during requests.
@github-actions github-actions bot added the fix label Dec 12, 2024
Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 3fdba42
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/675a57767ca8a9000828aedc

Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 3fdba42
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/675a5776bf08b800081ea5fb

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.

1 participant