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

fix: Make the search work for cozy-apps again #2227

Merged
merged 2 commits into from
Oct 28, 2024
Merged

fix: Make the search work for cozy-apps again #2227

merged 2 commits into from
Oct 28, 2024

Conversation

Ldoppea
Copy link
Member

@Ldoppea Ldoppea commented Oct 28, 2024

Since the search engine now uses a local PouchDB, the documents are not JSON-API compliant, so we should rely on _type instead of type

With previous implementation, we failed to compute icon for cozy-apps due to missing doc.type attribute, and returned the unknown type. This type was not handled by the <ResultMenuItem> item and the application would crash

This PR fixes the usage of the _type attribute but also return a default icon instead of unknown to prevent future crashes

Since the search engine now uses a local PouchDB, the documents are not
JSON-API compliant, so we should rely on `_type` instead of `type`
The `type: unknown` attribute was not handled by the `<ResultMenuItem>`
component and so the application would break
Copy link

bundlemon bot commented Oct 28, 2024

BundleMon

Unchanged files (13)
Status Path Size Limits
vendors/home.(hash).js
1.54MB -
services/softDeleteOrRestoreAccounts/home.js
464.4KB -
services/updateAccounts/home.js
461.47KB -
services/deleteAccounts/home.js
309.8KB -
services/myselfFromIdenties/home.js
234.35KB -
services/polyfillFetch/home.js
97.37KB -
app/home.(hash).js
55.82KB -
vendors-home.(hash).(hash).min.css
38.79KB -
intents/home.(hash).js
29.19KB -
services/attributesHelpers/home.js
15.22KB -
app-home.(hash).min.css
2.18KB -
intents/index.html
652B -
intents-home.(hash).min.css
158B -

Total files change +2B 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@Ldoppea Ldoppea merged commit e43bc43 into master Oct 28, 2024
4 checks passed
@Ldoppea Ldoppea deleted the fix/app_icons branch October 28, 2024 10:35
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