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

Set up redux infrastructure #33

Merged
merged 1 commit into from
Sep 21, 2023
Merged

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Sep 21, 2023

Description

Sets up the initial redux infrastructure for maintaining frontend state. We choose to use redux / react-redux / redux-toolkit libraries since it is the consistent way that core OSD + other plugins use, and is the standard across modern react applications. It also doesn't add any dependencies since we consume them from core OSD.

  • sets up global redux store via configureStore
  • sets up basic workspace reducer to process workspace-related state updates via createSlice
  • wraps the entire app within a Provider so React components have access to the store
  • sets up sample cmds for future reference as ways to access and set the store in the base WorkflowBuilder page

Tested with some basic functionalities, including adding some dummy components, and validating if there are changes. These are using the components and isDirty vars within the workspace state.

screen-capture.16.webm

Issues Resolved

Makes progress on #8 & #10

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Tyler Ohlsen <[email protected]>
Copy link
Member

@owaiskazi19 owaiskazi19 left a comment

Choose a reason for hiding this comment

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

Looks good on my end but I'll wait for @jackiehanyang review before merging it.

@jackiehanyang
Copy link
Collaborator

LGTM!

@ohltyler ohltyler merged commit c73ffb0 into opensearch-project:main Sep 21, 2023
8 checks passed
@ohltyler ohltyler deleted the add-redux branch September 21, 2023 21:30
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 21, 2023
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit c73ffb0)
ohltyler added a commit that referenced this pull request Sep 21, 2023
Signed-off-by: Tyler Ohlsen <[email protected]>
(cherry picked from commit c73ffb0)

Co-authored-by: Tyler Ohlsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants