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

[UI] Migrate to @reduxjs/toolkit tracker #7207

Open
6 tasks
acald-creator opened this issue Feb 26, 2023 · 15 comments
Open
6 tasks

[UI] Migrate to @reduxjs/toolkit tracker #7207

acald-creator opened this issue Feb 26, 2023 · 15 comments
Assignees
Labels
component/ui User Interface framework/react issue/design required Functional architecture issue/remind Issue progress check issue/willfix This issue will be worked on kind/enhancement Improvement in current feature language/javascript Issues or pull requests that use Javascript or React
Milestone

Comments

@acald-creator
Copy link
Contributor

acald-creator commented Feb 26, 2023

UPDATE There is an open PR and open issue to track migrating Meshery UI to the latest libraries and using the latest styles and components from the Sistent Design System.

Open Issue: layer5io/sistent#496
Open PR: layer5io/sistent#498

In the open PR, I've already started work on using the @reduxjs/toolkit store. But they are not tested very well because of needing to make sure that the Provider's login works correctly before authenticating and redirecting back to the homepage.

UPDATE This milestone has been pushed back to v7 only because we have couple of tickets that are asking for React Class to Function components conversion, and this is impacted because using the existing implementations of mapStateToProps and mapDispatchToProps are commonly associated with connect HOC component with react-redux.

Current Behavior

Redux has always been a complex library, but they've recently released a package called @reduxjs/toolkit which simplifies how you use react-redux in the app.

next-redux-wrapper has also released a newer version at v8, which is vastly different from v3 and also has support for @reduxjs/toolit.

After some research, I found that is best to not just use Redux as the only global state management package for Meshery.

I would like to point out other packages that can be of use with Redux, or without Redux.

  • jotai
  • xstate
  • zustand
  • mobx

Desired Behavior

This is an open issue to track progress after certain milestones occur.

  1. [UI] Convert React Class components to Function components tracker #7187
  2. [UI] Wrap Provider UI as an React Context in ui #7212
  3. [UI] Update CodeEditor to a different package #6965

Implementation

  • Research @reduxjs/toolkit
  • Consider moving some of the actions to not be used by Redux, and use it as a local state, (perhaps by Next.js or React context)
  • Create Theme Provider context to toggle light and dark theme done in forked branch

Research the current store.js and break it down into multiple slices.

  • update page path and title (could be used as a custom hook) Revised to be a Context API
  • update user information (could revise data-fetch.js to be a hook and reused within multiple components)
  • provider information
  • Kubernetes cluster information
  • Grafana / Prometheus information
  • Modify existing Drawer / App Bar collapse conditions to be used with useState instead of redux (WIP)

In this forked branch at https://github.com/nebula-aac/meshery/tree/feat/reduxjs-toolkit-migration, here are the list of features within the Redux store that will be implemented. Please note that these are in progress and already created in the forked branch.

  • Filters page state
  • Confirmation modal state
  • Grid state for Filters page
  • Kubernetes config state
  • Transform property state (could be revised)
  • User update state

Acceptance Tests

Mockups


Contributor Guides and Handbook

@acald-creator acald-creator added kind/enhancement Improvement in current feature language/javascript Issues or pull requests that use Javascript or React component/ui User Interface framework/react labels Feb 26, 2023
@github-actions
Copy link

This issue has been labeled with 'component/ui'. 🧰 Here are docs on Contributing to Meshery UI. 🎨 Here is the Meshery UI Figma File File. Lastly, here are docs on Contributing to Meshery's End-to-End Tests Using Cypress.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

@acald-creator acald-creator added this to the v0.8.0 milestone Feb 26, 2023
@roopeshsn
Copy link

Hi @acald-creator! I would like to work on this.

@acald-creator
Copy link
Contributor Author

@roopeshsn Awesome

Thanks for reaching out. This migration tracker is aiming for v0.8 milestone while we are still in v0.6.

It is quite possible to achieve this sooner but I will be updating this issue as time goes by to list some of the changes that will needs to be made.

In the meantime, you can still help and provide insights if you have any.

@roopeshsn
Copy link

Sure, @acald-creator! Let me see the existing implementation of react-redux and provide insights if any.

@acald-creator acald-creator added issue/design required Functional architecture pending-redux This item is dependent upon integration of Redux Thunk and Observable labels Mar 3, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

This issue has been labeled with 'design-required'. Note that prior to commencing on implementation, a design specification needs to be created and reviewed for approval. See Creating a Functional Specification to create a design spec.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

@acald-creator acald-creator removed the pending-redux This item is dependent upon integration of Redux Thunk and Observable label Mar 3, 2023
@acald-creator acald-creator self-assigned this Apr 29, 2023
@stale
Copy link

stale bot commented Jun 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Jun 8, 2023
@stale stale bot removed issue/stale Issue has not had any activity for an extended period of time labels Jun 9, 2023
@nebula-aac nebula-aac added the issue/willfix This issue will be worked on label Jun 9, 2023
@nebula-aac
Copy link
Contributor

bump

@Pranjal7852
Copy link

@nebula-aac I would like to work on this issue

@nebula-aac
Copy link
Contributor

bump

@nebula-aac nebula-aac modified the milestones: v0.8.0, v0.7.0 Sep 6, 2023
@leecalcote leecalcote modified the milestones: v0.7.0, v0.8.0 Dec 12, 2023
@sandramsc sandramsc added the issue/remind Issue progress check label Jan 4, 2024
Copy link

github-actions bot commented Jan 4, 2024

Checking in... it has been awhile since we've heard from you on this issue. Are you still working on it? Please let us know and please don't hesitate to contact a MeshMate or any other community member for assistance.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

@Yashsharma1911
Copy link
Contributor

// @senali-d @sudhanshutech

@nebula-aac
Copy link
Contributor

bump

@nebula-aac nebula-aac removed issue/willfix This issue will be worked on issue/remind Issue progress check labels Feb 7, 2024
@nebula-aac
Copy link
Contributor

bump again, updated this issue

Copy link

stale bot commented Mar 31, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the issue/stale Issue has not had any activity for an extended period of time label Mar 31, 2024
@vishalvivekm vishalvivekm added issue/willfix This issue will be worked on issue/remind Issue progress check and removed issue/stale Issue has not had any activity for an extended period of time labels Apr 4, 2024
Copy link

github-actions bot commented Apr 4, 2024

Checking in... it has been awhile since we've heard from you on this issue. Are you still working on it? Please let us know and please don't hesitate to contact a MeshMate or any other community member for assistance.


        Be sure to join the community, if you haven't yet and please leave a ⭐ star on the project 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ui User Interface framework/react issue/design required Functional architecture issue/remind Issue progress check issue/willfix This issue will be worked on kind/enhancement Improvement in current feature language/javascript Issues or pull requests that use Javascript or React
Projects
None yet
Development

No branches or pull requests

8 participants