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

Improve advisor availability filter and general page loading user experience #2109

Merged
merged 3 commits into from
May 30, 2024

Conversation

mkholjuraev
Copy link
Contributor

Essentially, this is an effort to improve the perceived performance of CVEs page. Before this change, the whole table was triggered loading and once the request to fetch cves for the table resolves, according to the advisor_availability info in the metadata, a new filter 'Advisor availability filter' was added. This would result in complete re-render of the table and the same API request to be triggered once more. Now, the advisory availability info is fetched on the very first page load with limit:1 and provided across components using react context.

Furthermore, there is another improvement for the general page loading user experience. Before, for example, while CVEs page was loading, the spinner would be displayed first in the center, then on top smaller, then on top bigger. This was not very pretty. Now, as one component is shared, the spinner is displayed only in the center. This improvement needs to be tested with this fix in the fec-components package: RedHatInsights/frontend-components#2010

@mkholjuraev mkholjuraev requested a review from a team as a code owner May 22, 2024 11:51
Copy link

jira-linking bot commented May 22, 2024

Commits missing Jira IDs:
6692891
99adcb1
Referenced Jiras:
https://issues.redhat.com/browse/RHINENG-3106

@mkholjuraev
Copy link
Contributor Author

cypress tests🗡️🗡️🗡️

@mkholjuraev
Copy link
Contributor Author

@RedHatInsights/team-interact this PR is ready for review. PTAL!

@mkholjuraev mkholjuraev changed the title Improve CVEs page loading and general page loading user experience Improve advisor availability filter and general page loading user experience May 29, 2024
}, [cves?.meta?.cves_without_errata, isLoading]);

setShowCvesWithoutErrata(includesCvesWithoutErrata);
}, [includesCvesWithoutErrata]);
Copy link
Member

Choose a reason for hiding this comment

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

There should be more dependencies here. We should at least also add showCvesWithoutErrata.

import { Bullseye } from '@patternfly/react-core';
import { Spinner } from '@patternfly/react-core';

export default () => (
Copy link
Member

Choose a reason for hiding this comment

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

This is not good practice as React will have to figure out some display name for the component. The shared fec aslant configure is set to warn about this, unfortunately vulnerability-ui is not (yet) using the shared config.

@mkholjuraev mkholjuraev requested review from bastilian and a team May 29, 2024 12:27
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 47.82609% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 66.65%. Comparing base (df3416c) to head (99adcb1).
Report is 4 commits behind head on master.

Files Patch % Lines
src/Utilities/VulnerabilityRoutes.js 26.31% 14 Missing ⚠️
...omponents/SmartComponents/CVEs/CVEsTableToolbar.js 70.00% 3 Missing ⚠️
src/index.js 0.00% 2 Missing ⚠️
src/App.js 0.00% 1 Missing ⚠️
...dInventory/ImmutableDevicesTab/ImmutableDevices.js 0.00% 1 Missing ⚠️
.../Components/SmartComponents/Reports/ReportsPage.js 0.00% 1 Missing ⚠️
...SmartComponents/SystemDetailsPage/SystemDetails.js 50.00% 1 Missing ⚠️
...ponents/SmartComponents/SystemsPage/SystemsPage.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2109      +/-   ##
==========================================
- Coverage   67.58%   66.65%   -0.94%     
==========================================
  Files         131      128       -3     
  Lines        3437     3440       +3     
  Branches     1066     1068       +2     
==========================================
- Hits         2323     2293      -30     
- Misses       1114     1147      +33     

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

Copy link
Contributor

@AsToNlele AsToNlele left a comment

Choose a reason for hiding this comment

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

Works as expected.
Having one spinner is a small change, but made a huge difference. Well done! 😄

@mkholjuraev mkholjuraev merged commit 7b6ff68 into RedHatInsights:master May 30, 2024
4 checks passed
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.

4 participants