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

[VO-1120] refactor(FolderPicker): Use ListItem instead File #3236

Merged
merged 9 commits into from
Oct 22, 2024

Conversation

cballevre
Copy link
Contributor

@cballevre cballevre commented Oct 18, 2024

This decouples the display of the file table from that of the FolderPicker modal. This will allow you to change the lines as Link in the table in order to take advantage of the default mechanisms of browsers

### 🔧 Tech

* Update filesize from 3.6.1 to 10.1.6
* Update cozy-client from 48.25.0 to 49.8.0
* Update cozy-intent from 2.22.0 to 2.23.0

Related PRs :

@cballevre cballevre requested a review from acezard as a code owner October 18, 2024 16:26
Copy link

bundlemon bot commented Oct 18, 2024

BundleMon

Files updated (6)
Status Path Size Limits
public/drive.(hash).js
1.56MB (+1.56KB +0.1%) 1.7MB
services/qualificationMigration/drive.js
282.15KB (+1.32KB +0.47%) 500KB
vendors/drive.(hash).js
1.79MB (+1.31KB +0.07%) 2MB
services/dacc/drive.js
263.08KB (+1.25KB +0.48%) 500KB
app/drive.(hash).js
161.61KB (+80B +0.05%) 300KB
app-drive.(hash).min.css
10.73KB (+23B +0.21%) 56KB
Unchanged files (12)
Status Path Size Limits
public/pdf.worker.entry.(hash).worker.js
345.35KB 350KB
public/cozy-client-js.js
159.28KB 160KB
intents/drive.(hash).js
87.62KB 190KB
public/drive.(hash).min.css
39.93KB 100KB
onlyOffice/slide.pptx
24.83KB 25KB
intents-drive.(hash).min.css
7.89KB 40KB
onlyOffice/text.docx
5.85KB 6KB
onlyOffice/spreadsheet.xlsx
5.02KB 6KB
manifest.webapp
1.87KB 2KB
index.html
598B 1KB
intents/index.html
507B 1KB
manifest.json
185B 1KB

Total files change +5.54KB +0.11%

Groups updated (4)
Status Path Size Limits
services/**
545.23KB (+2.57KB +0.47%) -
public/**
2.11MB (+1.56KB +0.07%) -
vendors/**
1.79MB (+1.31KB +0.07%) -
app/**
161.61KB (+80B +0.05%) -
Unchanged groups (3)
Status Path Size Limits
intents/**
88.12KB -
onlyOffice/**
35.7KB -
img/**
5.85KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link
Member

@Merkur39 Merkur39 left a comment

Choose a reason for hiding this comment

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

👍

Comment on lines +26 to +33
{Array.from({ length: 8 }, (_, index) => (
<ListItemSkeleton
key={`key_file_placeholder_${index}`}
gutters={gutters}
hasSecondary
divider={index !== 7}
/>
))}
Copy link
Member

Choose a reason for hiding this comment

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

nit: Ca pourrait sans doute être mémo sur isMobile pour éviter les multiples créations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Je dirais qu'il y a pas besoin car le temps de calcul de gutters n'est pas assez élever pour que ça soit pertinent et le composant n'est pas re-rendu car les paramètres ne change pas durant le rendu

@@ -95,4 +100,9 @@ FileThumbnail.propTypes = {
size: PropTypes.number
}

FileThumbnail.defaultProps = {
showSharedBadge: false,
componentsProps: {}
Copy link
Member

@Merkur39 Merkur39 Oct 22, 2024

Choose a reason for hiding this comment

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

Suggested change
componentsProps: {}
componentsProps: {
sharedBadge: {}
}

Ce qui permettrai d'éviter la condition componentsProps.sharedBadge ?? {} plus haut ?

@cballevre cballevre force-pushed the refactor/use-list-item-inside-folder-picker branch from dec0a7c to 5124ca0 Compare October 22, 2024 13:06
@cballevre cballevre enabled auto-merge (rebase) October 22, 2024 13:06
This decouples the display of the file table from that of the FolderPicker modal. This will allow you to change the lines as Link in the table in order to take advantage of the default mechanisms of browsers
@cballevre cballevre force-pushed the refactor/use-list-item-inside-folder-picker branch from 5124ca0 to be18bd0 Compare October 22, 2024 13:09
@cballevre cballevre merged commit 57296b5 into master Oct 22, 2024
3 checks passed
@cballevre cballevre deleted the refactor/use-list-item-inside-folder-picker branch October 22, 2024 13:13
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