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: Adapt search placeholder if assistant is disabled #2255

Closed
wants to merge 1 commit into from

Conversation

paultranvan
Copy link
Contributor

When the assistant is enabled, the search wording suggests the user to ask a question, that could be answered by the assistant or the search. But if the assistant is not enabled, we should adapt the wording to focus on search only.

### ✨ Features

* Adapt search placeholder if assistant is not enabled

### 🐛 Bug Fixes

*

### 🔧 Tech

*

Copy link

bundlemon bot commented Dec 9, 2024

BundleMon

Files updated (1)
Status Path Size Limits
app/home.(hash).js
56.17KB (+11B +0.02%) -
Unchanged files (12)
Status Path Size Limits
vendors/home.(hash).js
1.57MB -
services/softDeleteOrRestoreAccounts/home.js
466.06KB -
services/updateAccounts/home.js
463.21KB -
services/deleteAccounts/home.js
311.85KB -
services/myselfFromIdenties/home.js
236.25KB -
services/polyfillFetch/home.js
97.38KB -
vendors-home.(hash).(hash).min.css
37.78KB -
intents/home.(hash).js
26.59KB -
services/attributesHelpers/home.js
15.22KB -
app-home.(hash).min.css
2.21KB -
intents/index.html
653B -
intents-home.(hash).min.css
158B -

Total files change +11B 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

Copy link
Contributor

@JF-Cozy JF-Cozy left a comment

Choose a reason for hiding this comment

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

ça utilise la SearchBar au final, qui a le wording souhaité par défaut 🤔 est-ce que t'as essayé en supprimant le placeholder plutôt qu'en le remplaçant ? Histoire de retomber sur le cas par défaut (sinon faut regarder la doc pour savoir comment retomber dans le cas par défaut)

@paultranvan
Copy link
Contributor Author

ça utilise la SearchBar au final, qui a le wording souhaité par défaut

ah je ne savais pas qu'on avait un fallback automagique, j'ai amend le commit

@@ -43,7 +45,9 @@ export const AssistantWrapperMobile = () => {
<Icon className="u-ml-1 u-mr-half" icon={AssistantIcon} size={24} />
}
type="button"
label={t('assistant.search.placeholder')}
label={
isAssistantEnabled ? t('assistant.search.placeholder') : '' // Fallback on SearchBar default
Copy link
Contributor

@JF-Cozy JF-Cozy Dec 9, 2024

Choose a reason for hiding this comment

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

perso je mettrai plutôt un undefined qu'une string vide, c'est plus clair à mon sens qu'en au fait qu'on part alors sur le comportement par défaut du composant (et donc pas besoin du commentaire)

Copy link
Contributor Author

@paultranvan paultranvan Dec 9, 2024

Choose a reason for hiding this comment

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

Pour moi ça ne change pas grand chose, il y a toujours besoin du commentaire pour savoir qu'il y a un fallback, mais ok pour un explicite undefined

When the assistant is enabled, the search wording suggests the user to
ask a question, that could be answered by the assistant or the search.
But if the assistant is not enabled, we should adapt the wording to
focus on search only.
@zatteo
Copy link
Contributor

zatteo commented Dec 17, 2024

Closing because moved here cozy/cozy-libs@57a1507

@zatteo zatteo closed this Dec 17, 2024
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.

3 participants