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

Fleet UI: Allow select target search for labels and teams #24798

Merged
merged 10 commits into from
Dec 23, 2024

Conversation

RachelElysia
Copy link
Member

@RachelElysia RachelElysia commented Dec 16, 2024

Issue

Cerra #22448

Description

  • Allow users to search labels and teams when selecting entities for live query or live policy
  • QA:
  • Show more and show less toggle button shows if there are more than 600 characters in the labels/team names
  • When a team/label is selected within the show more "hidden" section, that section will automatically be open when coming back from running a query
  • Search bar will hide the show more/less button if there isn't any more items to show
  • Search bar has a button to clear search

TODO

Tests

Screenshot/screen recording

Note: This screenrecording had a character limit of 100 set for demo purposes, changed it to 600
https://github.com/user-attachments/assets/31578d10-214a-4812-af89-33403946ff58

  • Changes file added for user-visible changes in changes/, orbit/changes/ or ee/fleetd-chrome/changes.
  • Added/updated tests
  • Manual QA for all new/changed functionality

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.25%. Comparing base (6c79c07) to head (af79fec).
Report is 145 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24798      +/-   ##
==========================================
- Coverage   54.28%   54.25%   -0.03%     
==========================================
  Files        1601     1603       +2     
  Lines      151676   151849     +173     
  Branches     3952     4017      +65     
==========================================
+ Hits        82334    82389      +55     
- Misses      62546    62661     +115     
- Partials     6796     6799       +3     
Flag Coverage Δ
frontend 53.45% <100.00%> (-0.32%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@RachelElysia RachelElysia marked this pull request as ready for review December 16, 2024 20:56
@RachelElysia RachelElysia requested a review from a team as a code owner December 16, 2024 20:56
Copy link
Contributor

@jacobshandling jacobshandling left a comment

Choose a reason for hiding this comment

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

Should this devnote say "above" the limit? Is it saying "if any team/labels are selected that would be truncated, default to showing all of the things" ? If so, it is working like that.

Copy link
Contributor

@jacobshandling jacobshandling left a comment

Choose a reason for hiding this comment

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

Works great! Shared some thoughts on potential optimizations / style considerations

frontend/components/LiveQuery/SelectTargets.tsx Outdated Show resolved Hide resolved
frontend/components/LiveQuery/SelectTargets.tsx Outdated Show resolved Hide resolved
frontend/components/LiveQuery/SelectTargets.tsx Outdated Show resolved Hide resolved
frontend/components/LiveQuery/SelectTargets.tsx Outdated Show resolved Hide resolved
frontend/components/LiveQuery/SelectTargets.tsx Outdated Show resolved Hide resolved
frontend/components/LiveQuery/SelectTargets.tsx Outdated Show resolved Hide resolved
@RachelElysia RachelElysia merged commit d8129bf into main Dec 23, 2024
14 checks passed
@RachelElysia RachelElysia deleted the 22448-select-target-search branch December 23, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants