Skip to content

Conversation

@artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Aug 27, 2024

Closes #1160

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
124 118 0 6 0

Bundle Size: 🔺

Current: 78.87 MB | Main: 78.86 MB
Diff: +0.01 MB (0.01%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@artemmufazalov artemmufazalov force-pushed the 1160-use-storage-groups branch 5 times, most recently from 69e6ea2 to dfa54b9 Compare August 27, 2024 16:25
@artemmufazalov artemmufazalov marked this pull request as ready for review August 28, 2024 08:50
function GetCapabilities() {
capabilitiesApi.useGetClusterCapabilitiesQuery(undefined);
return null;
function GetCapabilities({children}: {children: React.ReactNode}) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now the whole interface is blocked by capabilities response

I think it would better to do it in background without impact on functionality that doesn't rely on capabilities (endpoint may timeout or throw an error)

options: AxiosOptions,
getState?: GetState,
) {
const groupsHandlerVersion =
Copy link
Collaborator

Choose a reason for hiding this comment

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

wouldnt it be better to create enableSomeFunctionality and hook with
return useGetFeatureVersion('/viewer/sth') > 2;

and to pass these flags to functions that depend on it

instead of mixing redux state operations with api calls by passing getState function

v1 = 'v1',
v2 = 'v2', // only this versions works with sorting
}
export type EVersion = 'v1' | 'v2'; // only v2 versions works with sorting
Copy link
Collaborator

Choose a reason for hiding this comment

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

enum looked better imho

}: StorageRequestParams & {useGroupsHandler?: boolean},
options: AxiosOptions,
) {
if (useGroupsHandler && version !== 'v1') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

useGroupsHandler really looks like name of react hook

was really confused why we pass hooks to api =)

Please change useGroupsHandler to something else >_<

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.

switch to use storage/groups handler to display storage views

3 participants