Skip to content

refactor: Use useSettings hook in DefaultRedirectionSnackbar#2117

Open
Ldoppea wants to merge 3 commits intomasterfrom
feat/use_setting
Open

refactor: Use useSettings hook in DefaultRedirectionSnackbar#2117
Ldoppea wants to merge 3 commits intomasterfrom
feat/use_setting

Conversation

@Ldoppea
Copy link
Copy Markdown
Contributor

@Ldoppea Ldoppea commented Apr 11, 2024

In linagora/cozy-client#1460 we implemented a new useSettings hook

This hook can be used in DefaultRedirectionSnackbar in order to simplify code and homogenize the way we access cozy-apps settings

### ✨ Features

*

### 🐛 Bug Fixes

*

### 🔧 Tech

* Refactor `DefaultRedirectionSnackbar` to use new `useSettings` hook

...homeSettings,
default_redirection_view_count: default_redirection_view_count
? default_redirection_view_count + 1
: 1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not see anymore this logic of setting 1 if there was no value before. Will it work ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed here and in cozy-client

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Finally we did not include the default parameter option in the useSettings API, so I added the necessary code in this cozy-home PR

Ldoppea added 3 commits April 19, 2024 13:35
`cozy-client` has been upgraded to `46.9.0` to retrieve the new
useSettings hook

Related PR: linagora/cozy-client#1460
In linagora/cozy-client#1460 we implemented a new `useSettings` hook

This hook can be used in `DefaultRedirectionSnackbar` in order to
simplify code and homogenize the way we access cozy-apps settings
@Ldoppea Ldoppea changed the title feat: TEMP useSetting refactor: Use useSettings hook in DefaultRedirectionSnackbar Apr 19, 2024
@bundlemon
Copy link
Copy Markdown

bundlemon bot commented Apr 19, 2024

BundleMon

Files updated (7)
Status Path Size Limits
vendors/home.(hash).js
1.41MB (+4KB +0.28%) 1.5MB
intents/home.(hash).js
21.86KB (-23B -0.1%) 35KB
app/home.(hash).js
36.12KB (-152B -0.41%) 50KB
services/updateAccounts/home.js
444.01KB (-20.84KB -4.48%) 465KB
services/softDeleteOrRestoreAccounts/home.js
446.83KB (-20.88KB -4.46%) 490KB
services/deleteAccounts/home.js
292.95KB (-21.04KB -6.7%) 500KB
services/myselfFromIdenties/home.js
217.26KB (-21.13KB -8.86%) 240KB
Unchanged files (6)
Status Path Size Limits
services/polyfillFetch/home.js
98.39KB 99KB
vendors-home.(hash).(hash).min.css
38.55KB 40KB
services/attributesHelpers/home.js
15.13KB 16KB
app-home.(hash).min.css
1.34KB 15KB
intents/index.html
648B 1KB
intents-home.(hash).min.css
158B 6KB

Total files change -80.05KB -2.55%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@Ldoppea Ldoppea marked this pull request as ready for review April 19, 2024 15:55
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