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

[0.14.0] Truncate source list displayed in delete dialog #2293

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

zenmonkeykstop
Copy link
Contributor

Status

Ready for review

Description

Fixes #2284

Sets a limit of 32 sources to be displayed in the deletion dialog before the list is truncated to avoid text overruns that push the safety warnings out of the viewport.

  • If the number of sources is 32 or less, the entire list of sources is displayed
  • If the number is 33 or more, 30 sources are displayed followed by a message ... plus N additional sources where N = len(sources -30)

Test Plan

  • set up an SD instance (dev easiest) with ~150 sources.

  • start the client using that instance

  • select 1 source, click DELETE SOURCES and verify that only the source is shown. Click "YES.." and verify that the source is deleted.

  • select 32 sources, click DELETE SOURCES and verify that the sources are all shown. Click "YES.." and verify that the sources are deleted.

  • select 33 sources, click DELETE SOURCES and verify that the first 30 sources are shown followed by a message plus 3 additional sources. Click "YES.." and verify that the sources are deleted.
    -[ ] select all remaining sources, click DELETE SOURCES and verify that the first 30 sources are shown followed by a message plus N additional sources, where N+30 equals the total number of sources shown in the YES,... button . Click "YES.." and verify that all sources are deleted.

@zenmonkeykstop zenmonkeykstop requested a review from a team as a code owner November 14, 2024 01:23
@zenmonkeykstop zenmonkeykstop force-pushed the 2284-truncated-source-list branch from 41bd700 to 4fd8dcb Compare November 14, 2024 01:28
Copy link
Contributor

@deeplow deeplow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, followed the test steps and it all worked as expected. Approving.

Do we also want to make a test for this after the release?

@deeplow deeplow added this pull request to the merge queue Nov 14, 2024
Merged via the queue into main with commit 5ddbedc Nov 14, 2024
58 checks passed
@deeplow deeplow deleted the 2284-truncated-source-list branch November 14, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

List of sources is truncated in deletion confirmation dialog when source count is high
2 participants