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

Mutualize fetching functions #2099

Closed
wants to merge 18 commits into from
Closed

Mutualize fetching functions #2099

wants to merge 18 commits into from

Conversation

Meklo
Copy link
Contributor

@Meklo Meklo commented May 23, 2024

Copy link
Contributor

@flomillot flomillot left a comment

Choose a reason for hiding this comment

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

Need to update commons-ui or it won't works no ?

throw error;
});
};
import { fetchAppsAndUrls, fetchEnv } from '@gridsuite/commons-ui';

export const getToken = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's still needed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To answer the above : yes it will be necessary to update commons ui in this PR
Regarding getToken maybe we could mutualize it as well, I just think it'd be wiser to limit the number of functions migrated at once to prevent risks of unexpected side effects

Copy link
Contributor

Choose a reason for hiding this comment

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

Well it's the point of the ticket, mutualize what we can, it won't be done after if we don't do it now, i'm pretty sure, so well...
You can check with a TL but for me, it need to be done here alos.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've just talked about it with @TheMaskedTurtle, we ought to prioritize fixing commons-ui to release gridstudy deadlock.
I can create a following ticket to clean up the rest of utils functions getVersion, auth function, etc...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This said I can clean up getToken since it's already in commons ui, didn't noticed earlier

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, yes deleting getToken is really fast to do.
Or instead of creating a new ticket, you can juste make 2 PR, this one to unblock the devs, and an other one to finish the ticket ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I figured this too later, fine by me I'll do a second PR later then

Hugo Marcellin added 2 commits May 27, 2024 14:32
Copy link
Contributor

@Tristan-WorkGH Tristan-WorkGH left a comment

Choose a reason for hiding this comment

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

Found that

  • src/services/explore.ts
    • createFilter() not removed
    • elementExists() not removed
  • commons-ui version not updated in package.json

@Meklo Meklo requested review from flomillot and Tristan-WorkGH May 28, 2024 14:05
export const getToken = () => {
const state = store.getState();
return state.user.id_token;
export const FetchStatus = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you moved it back ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those are more related to component logic than api services and this one is slightly different than the one currently in commons ui, because it's use in gridexplore has different labels. So first we need to harmonize their values and as said earlier I'd want this PR to not be too bloated, I can include this in the next one

@dbraquart dbraquart self-requested a review July 4, 2024 06:53
Copy link
Contributor

@dbraquart dbraquart left a comment

Choose a reason for hiding this comment

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

code: ok
tests: to be done after merge wConclicts

@thangqp thangqp closed this Jul 24, 2024
@thangqp thangqp deleted the feat/update_common_ui_0.59.0 branch July 24, 2024 16:33
@thangqp thangqp restored the feat/update_common_ui_0.59.0 branch July 24, 2024 17:40
@thangqp thangqp reopened this Jul 24, 2024
@Meklo Meklo closed this Dec 12, 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.

5 participants