Skip to content

Conversation

zatteo
Copy link
Member

@zatteo zatteo commented May 20, 2025

To support routing in tabs that are not based on a folder (for example /sharings, /recent, /favorites), we used to duplicate every routes so that we can browse files and folders in /sharings or /recent.

Here, we take advantage of /favorites routes to be broken to try another approach. When in the /favorites tab, we set every link to default folders (folder/:id) and files (folder/:id/file/:id) links. So we do not browse files and folders in /favorites/xxx route anymore.

When clicking on a file or a folder :

  • browser back button goes back to /favorites
  • Drive navigation back button goes to folder higher in folder hierarchy

@zatteo zatteo force-pushed the fix/favorite-path branch 2 times, most recently from 6d7c0c9 to 0ca021f Compare May 21, 2025 06:14
Copy link

bundlemon bot commented May 21, 2025

BundleMon

Files updated (2)
Status Path Size Limits
public/static/js/public.(hash).js
84.23KB (+43B +0.05%) -
static/js/main.(hash).js
112.88KB (+32B +0.03%) -
Unchanged files (19)
Status Path Size Limits
static/js/(chunkId).(hash).js
1.06MB -
public/static/js/(chunkId).(hash).js
859.38KB -
static/js/cozy.(hash).js
733.75KB -
public/static/js/cozy.(hash).js
597.52KB -
(hash).js
337.62KB -
public/(hash).js
337.62KB -
services/qualificationMigration.js
273.84KB -
services/dacc.js
256.78KB -
public/static/js/lib-react.(hash).js
39.37KB -
static/js/lib-react.(hash).js
39.37KB -
public/static/css/cozy.(hash).css
33.7KB -
static/css/cozy.(hash).css
33.7KB -
public/static/js/lib-router.(hash).js
22.05KB -
static/js/lib-router.(hash).js
22.05KB -
static/css/main.(hash).css
16.24KB -
public/static/css/public.(hash).css
5.59KB -
manifest.webapp
1.89KB -
index.html
688B -
assets/manifest.json
185B -

Total files change +71B 0%

Groups updated (1)
Status Path Size Limits
**/*.js
6.3MB (+49B 0%) -
Unchanged groups (2)
Status Path Size Limits
**/*.{png,svg,ico}
2.15MB -
**/*.css
128.23KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@@ -100,6 +100,11 @@ export const computePath = (
case 'shortcut':
return `/external/${file._id}`
case 'directory':
// If we are in /favorites tab, we do not want it to appears in computed path
Copy link
Contributor

Choose a reason for hiding this comment

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

On mobile, if we are in /favorites tab... I think will be better to understand next time what we are talking about here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated

To support routing in tabs that are not based on a folder (for example /sharings, /recent, /favorites), we used to duplicate every routes so that we can browse files and folders in /sharings or /recent.

Here, we take advantage of /favorites routes to be broken to try another approach. When in the /favorites tab, we set every link to default folders (folder/:id) and files (folder/:id/file/:id) links. So we do not browse files and folders in /favorites/xxx route anymore.

When clicking on a file or a folder :
- browser back button goes back to /favorites
- Drive navigation back button goes to folder higher in folder hierarchy
@zatteo zatteo force-pushed the fix/favorite-path branch from 0ca021f to b4e6207 Compare May 21, 2025 07:12
@zatteo zatteo merged commit ee94ffc into master May 21, 2025
4 checks passed
@zatteo zatteo deleted the fix/favorite-path branch May 21, 2025 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants