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

Refactored FilterTags.tsx to sort filters labels in a predefined order (CRASM-931) #741

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

lwersiy
Copy link
Collaborator

@lwersiy lwersiy commented Dec 12, 2024

🗣 Description

  • This PR applies sorting logic to sort FilterTags by predefined order from left to right.
  • Ensures filters are displayed in a consistent and logical order, making it easier to understand.

Existing Behavior

  • The current behavior simply places the most recent filtered component at the end of the FilterTags.
  • This jumbles the order of filters if they are removed and re-added.
  • Provides a rough user experience.

Expected Behavior

FilterDrawer components are in order from top to bottom as follows:

  • Regions
  • Organization
  • IPs
  • Domains
  • Root Domains
  • Ports
  • CVE
  • Severity

FilterTags order from Left to Right:
Region, Organizations, IPs, Domains, Root Domains, Ports, CVE, Severity.

💭 Motivation and context

Closes CRASM-931
Closes #739

🧪 Testing

Tested Locally

📷 Screenshots (if appropriate)

Existing Behavior

Screenshot 2024-12-09 at 12 40 12 PM

Expected Behavior

Screenshot 2024-12-12 at 10 30 21 AM

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

…o right, ensuring filters are desplayed in a consistent and logical order, making it easier to understand
@lwersiy lwersiy self-assigned this Dec 12, 2024
@lwersiy lwersiy added bug This issue or pull request addresses broken functionality frontend labels Dec 12, 2024
@hawkishpolicy hawkishpolicy marked this pull request as ready for review December 17, 2024 19:28
…-to-be-in-a-consistent-order-as-filterdrawer-components
@hawkishpolicy hawkishpolicy changed the title Refactored FilterTags.tsx to sort filters labels in a predefined order Refactored FilterTags.tsx to sort filters labels in a predefined order (CRASM-931) Dec 20, 2024
@hawkishpolicy hawkishpolicy self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set FilterTags to be in a consistent order as FilterDrawer Components
2 participants