AzureStorageExplorer icon indicating copy to clipboard operation
AzureStorageExplorer copied to clipboard

Ensure consistency of patterns/design in react explorer code, dedupe code where possible

Open MRayermannMSFT opened this issue 2 years ago • 5 comments

Now that the majority of explorers are migrated to react, let's go back through and make sure we are being consistent across each explorer with regards to patterns and designs. Additionally, let's reduce code duplication where possible. Areas initially thought of as warranty attention include:

  • data source implementations (including support for global sort and load all)
  • listening for clipboard changings
  • customizing columns
  • context menu and toolbar config handling
  • error handling

Feel free to include/investigate additional areas.

For 1.33, please do independent investigation into coming up with actionable things we can do regarding this topic. After investigationg, discuss together and create engineering issues for 1.34.

### Areas of Improvement
- [ ] https://github.com/microsoft/AzureStorageExplorer/issues/7738
- [ ] https://github.com/microsoft/AzureStorageExplorer/issues/7737
- [ ] https://github.com/microsoft/AzureStorageExplorer/issues/7493
- [ ] Determine best format for HTML files, location of script tags
- [ ] #7526
- [ ] https://github.com/microsoft/AzureStorageExplorer/issues/7950
- [ ] https://github.com/microsoft/AzureStorageExplorer/issues/7508

MRayermannMSFT avatar Sep 29 '23 16:09 MRayermannMSFT

Potential places that can be improved:

  • [ ] Split Context and State.
  • [ ] Aggregate data loading state properties related to a sub-object in state.
  • [ ] Use state to track data loading type.

JasonYeMSFT avatar Oct 11 '23 16:10 JasonYeMSFT

Let's move all suggestions to the first comment so we can keep them together in a task list.

craxal avatar Oct 11 '23 17:10 craxal

The conclusion of a recent discussion is to implement a custom DataGridHook that can handle all the common logic for deriving props needed by DataGrid from the Explorer. The common logic include paging, selection, sorting, and data loading orchestration. This DataGridHook will help us de-duplicate code for these common logic in the existing explorers. Craig will work on a prototype in 1.34.0.

JasonYeMSFT avatar Feb 07 '24 18:02 JasonYeMSFT

Main deliverable for 1.34: Share the data loading code/logic among our explorers:

  • Data source
  • Event lifecycles for data loadings

MRayermannMSFT avatar Feb 22 '24 18:02 MRayermannMSFT

Main deliverable for 1.34.0 is effectively done but untested. Pushing back due to higher-priority items.

craxal avatar Apr 16 '24 17:04 craxal