fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Update save/edit query forms to be consistent with save/edit policy

Open sgress454 opened this issue 1 year ago • 1 comments

For #27601

Details

A couple of updates to the save/edit Query screens to bring them in line with how save/edit Policy screens work, as described in the Figma:

  • Moved platform selector out from under Advanced
  • Use checkboxes for selecting platforms
  • Disable Save button when no platforms are selected
  • In the "Save new query" modal, pre-select the platforms that are compatible with the query

Testing

  1. Add a new query with the SQL "SELECT * FROM privacy_preferences;". Verify that only ChromeOS is checked in the modal when you click Save.
  2. Verify that if you deselect ChromeOS (so that no platforms are selected), the save button is disabled in the modal.
  3. Select one or more platforms and save the query.
  4. After saving the query, edit it and verify that the platforms you selected are checked.
  5. Verify that deselecting all platforms disables the edit button on the Edit Query screen.
  6. Select different platforms, save, and refresh to verify that the platforms you selected were persisted.

sgress454 avatar Apr 02 '25 22:04 sgress454

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 63.42%. Comparing base (d6eaa09) to head (031bfd1). Report is 68 commits behind head on main.

Files with missing lines Patch % Lines
...es/edit/components/EditQueryForm/EditQueryForm.tsx 83.33% 1 Missing :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #27821   +/-   ##
=======================================
  Coverage   63.41%   63.42%           
=======================================
  Files        1765     1765           
  Lines      168342   168331   -11     
  Branches     4914     4841   -73     
=======================================
+ Hits       106758   106764    +6     
+ Misses      53258    53241   -17     
  Partials     8326     8326           
Flag Coverage Δ
frontend 52.46% <90.90%> (+0.07%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 03 '25 16:04 codecov[bot]

Thanks @ghernandez345

jacobshandling avatar Apr 08 '25 16:04 jacobshandling