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(security-insights): set filtered table data on initial load #1707

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

Conversation

pc-bob
Copy link
Contributor

@pc-bob pc-bob commented Oct 30, 2024

This PR updated this component to filter to open on initial load. However, on initial load only tableData was being set previously.

Fixes: #1492

There is a check in the JSX to render filteredTableData if insightsStatusFilter is set. Since insightsStatusFilter is set with the default state value now (const [insightsStatusFilter, setInsightsStatusFilter] = useState<SecurityInsightFilterState>('open');), this was rendering filteredTableData on the first render which was null. Clicking on Open would display data but may give uses a false sense of security that they have no security insights with a quick glance at the tab.

✔️ Checklist

  • Added tests for new functionality and regression tests for bug fixes
    • there are no existing tests for this component
  • Added changeset (run yarn changeset in the root)
  • Screenshots of before and after attached (for UI changes)
    • Tested this on one of our components that has security insights but don't really want to post screenshots because security
  • Added or updated documentation (if applicable)
    • N/A - bug fix

@pc-bob pc-bob force-pushed the BL/fix-security-insights-first-load branch from 1ef7f95 to dc29b55 Compare October 30, 2024 23:54
@pc-bob pc-bob marked this pull request as ready for review October 30, 2024 23:54
@pc-bob pc-bob requested a review from a team as a code owner October 30, 2024 23:54
Copy link
Contributor

github-actions bot commented Nov 6, 2024

This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution!

@github-actions github-actions bot added the stale label Nov 6, 2024
@pc-bob
Copy link
Contributor Author

pc-bob commented Nov 7, 2024

This PR is not stale. @punkle could I get some assistance on a review for this one?

@github-actions github-actions bot removed the stale label Nov 7, 2024
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.

Security Insights Content Page is not rendering table as expected
1 participant