-
Notifications
You must be signed in to change notification settings - Fork 14
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
MGDCTRS-1926 chore: remove app-services-ui-shared usage #799
Open
gashcrumb
wants to merge
5
commits into
bf2fc6cc711aee1a0c2a:main
Choose a base branch
from
gashcrumb:MGDCTRS-1926
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gashcrumb
changed the title
MGDCTRS-1926 chore: remove useBasename usage
MGDCTRS-1926 chore: remove useBasename and useAuth usage
Apr 5, 2023
gashcrumb
changed the title
MGDCTRS-1926 chore: remove useBasename and useAuth usage
MGDCTRS-1926 chore: remove useBasename, useAuth and useAlert usage
Apr 6, 2023
gashcrumb
force-pushed
the
MGDCTRS-1926
branch
2 times, most recently
from
April 6, 2023 17:47
f31edc4
to
7c732f7
Compare
gashcrumb
changed the title
MGDCTRS-1926 chore: remove useBasename, useAuth and useAlert usage
MGDCTRS-1926 chore: remove useBasename, useAuth, useAlert and useConfig usage
Apr 7, 2023
gashcrumb
changed the title
MGDCTRS-1926 chore: remove useBasename, useAuth, useAlert and useConfig usage
MGDCTRS-1926 chore: remove app-services-ui-shared usage
Apr 7, 2023
This change removes the calls to useBasename provided by app-services-ui-shared. It also updates the way chrome is accessed when initializing analytics, as accessing insights chrome via the window object has been marked deprecated. Also this change removes a duplicate package from the package.json file.
This change removes references to Auth and useAuth from app-services-ui-shared and replaces them with the functional equivalent, when the app is a federated module the token is obtained from the insights chrome object, when the app is being run for local development keycloak is used and finally for the e2e tests a dummy value is used.
This change introduces a local useAlert hook to replace the implementation from app-services-ui-shared. In federated mode this hook is now connected to the console notification system via frontend-components-notifications, and this component is now a direct dependency. This commit therefore also contains some required initialization code and dependencies such as a redux store and react-redux for frontend-components-notifications. Finally, this commit also changes the routing behavior when saving a configuration change, the user remains in the connector detail/overview page when editing a connector instead of going back to the connector list.
This change removes usage of useConfig from app-services-ui-shared. The data it was providing has been moved to the useCos hook. For the federated entrypoint AppFederated.tsx the mapping that exists in app-services-ui is now local and added to a new endpoints file as constant values. The federated entrypoint will consult this map during initialization and will use the appropriate backend based on the hostname used to access the console. The standalone (AppDemo) and e2e (AppE2E) entrypoints behave as before but each contain their own specific setup to cater for their usage.
This change removes the remaining references to app-services-ui-shared from the code as well as from the webpack config. The entry in package.json remains however as app-services-ui-components also has a dependency on this package.
Keeping this around as some of these changes may be useful. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The first commit removes the calls to useBasename provided by app-services-ui-shared. It also updates the way chrome is accessed when initializing analytics, as accessing insights chrome via the window object has been marked deprecated. Also this change removes a duplicate package from the package.json file.
The 2nd commit in this PR removes references to Auth and useAuth from app-services-ui-shared and replaces them with the functional equivalent, when the app is a federated module the token is obtained from the insights chrome object, when the app is being run for local development keycloak is used and finally for the e2e tests a dummy value is used.
The 3rd commit in this PR introduces a local useAlert hook to replace the implementation from app-services-ui-shared. In federated mode this hook is now connected to the console notification system via frontend-components-notifications, and this component is now a direct dependency. This commit therefore also contains some required initialization code and dependencies such as a redux store and react-redux for frontend-components-notifications. Note: not sure if this quite works in app-services-ui dev mode. Finally, this commit also changes the routing behavior when saving a configuration change, the user remains in the connector detail/overview page when editing a connector instead of going back to the connector list.
The 4th commit removes usage of useConfig from app-services-ui-shared. The data it was providing has been moved to the useCos hook. For the federated entrypoint AppFederated.tsx the mapping that exists in app-services-ui is now local and added to a new endpoints file as constant values. The federated entrypoint will consult this map during initialization and will use the appropriate backend based on the hostname used to access the console. The standalone (AppDemo) and e2e (AppE2E) entrypoints behave as before but each contain their own specific setup to cater for their usage.
The last commit removes the remaining references to app-services-ui-shared from the code as well as from the webpack config. The entry in package.json remains however as app-services-ui-components also has a dependency on this package.