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

feat: Folder Explorer in any page #2622

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Aug 9, 2024

TL;DR

The FolderExplorerOpener component has been added within a wrapper in the main layout. Additionally, there is refactoring of related components and hooks for optimized folder querying and a minor bug fix.
Now, Folder Explorer can be opened in any page without page transition.

What changed?

  • Wrapped with in the main layout.
  • Refactored FolderExplorerOpener to use React.lazy for dynamic imports.
  • Modified logic in LegacyFolderExplorer to leverage Relay for data fetching.
  • Introduced a new utility function formatToUUID for string to UUID conversion.
  • Updated pages and components to use the new FolderExplorerOpener logic accordingly.
  • Removed redundant imports and code to ensure optimized performance and maintainability.
  • Fixed navigation issue when closing the folder explorer.

How to test?

  1. Pull the latest changes and run the project.
  2. Navigate through the application and ensure the folder explorer opens without issues.
  3. Verify that the folder explorer properly fetches and displays folder names. (You can open folder by clicking folder name in /data page and endpoint detail page.
  4. Test edge cases, such as closing the folder explorer and opening it with different folder IDs.

Why make this change?

This change enhances the user experience by ensuring that the folder explorer is only loaded when needed, thus optimizing the application's performance. The refactoring also improves code maintainability and introduces utility methods for common tasks.

Copy link

graphite-app bot commented Aug 9, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Member Author

yomybaby commented Aug 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @yomybaby and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the size:L 100~500 LoC label Aug 9, 2024
@yomybaby yomybaby changed the title feature: Folder Explorer in any page feat: Folder Explorer in any page Aug 9, 2024
@yomybaby yomybaby force-pushed the feature/folder-explorer-in-anypage branch from c90a54f to 866933f Compare August 12, 2024 03:15
@yomybaby yomybaby marked this pull request as ready for review August 12, 2024 07:00
@yomybaby yomybaby requested a review from ironAiken2 August 12, 2024 07:01
@ironAiken2 ironAiken2 changed the base branch from feat/legacy-folder-explorer to graphite-base/2622 August 12, 2024 07:49
@ironAiken2 ironAiken2 force-pushed the feature/folder-explorer-in-anypage branch from 866933f to ec8c1e5 Compare August 12, 2024 07:51
@ironAiken2 ironAiken2 changed the base branch from graphite-base/2622 to main August 12, 2024 07:52
Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

graphite-app bot commented Aug 12, 2024

Merge activity

### TL;DR
The FolderExplorerOpener component has been added within a <Suspense> wrapper in the main layout. Additionally, there is refactoring of related components and hooks for optimized folder querying and a minor bug fix.
Now, Folder Explorer can be opened in any page without page transition.

### What changed?
- Wrapped <FolderExplorerOpener> with <Suspense fallback={null}> in the main layout.
- Refactored FolderExplorerOpener to use React.lazy for dynamic imports.
- Modified logic in LegacyFolderExplorer to leverage Relay for data fetching.
- Introduced a new utility function `formatToUUID` for string to UUID conversion.
- Updated pages and components to use the new FolderExplorerOpener logic accordingly.
- Removed redundant imports and code to ensure optimized performance and maintainability.
- Fixed navigation issue when closing the folder explorer.

### How to test?
1. Pull the latest changes and run the project.
2. Navigate through the application and ensure the folder explorer opens without issues.
3. Verify that the folder explorer properly fetches and displays folder names. (You can open folder by clicking folder name in `/data` page and endpoint detail page.
4. Test edge cases, such as closing the folder explorer and opening it with different folder IDs.

### Why make this change?
This change enhances the user experience by ensuring that the folder explorer is only loaded when needed, thus optimizing the application's performance. The refactoring also improves code maintainability and introduces utility methods for common tasks.
@ironAiken2 ironAiken2 force-pushed the feature/folder-explorer-in-anypage branch from ec8c1e5 to 85da0f7 Compare August 12, 2024 08:19
Copy link

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements
3.17% (+0% 🔼)
184/5802
🔴 Branches
3.16% (+0% 🔼)
123/3894
🔴 Functions
1.87% (+0% 🔼)
36/1922
🔴 Lines
3.04% (+0% 🔼)
173/5683
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴 helper/index.tsx
44.83% (-0.79% 🔻)
43.33% (-0.59% 🔻)
32.56% (-0.78% 🔻)
45.1% (-0.9% 🔻)

Test suite run success

64 tests passing in 6 suites.

Report generated by 🧪jest coverage report action from 85da0f7

@graphite-app graphite-app bot merged commit 85da0f7 into main Aug 12, 2024
7 checks passed
@graphite-app graphite-app bot deleted the feature/folder-explorer-in-anypage branch August 12, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L 100~500 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants