Repository navigation
fix: ship the Space emoji list with the app so the picker works offline - #2193
Draft
Douglasymlai wants to merge 1 commit into
Draft
Douglasymlai wants to merge 1 commit into
Douglasymlai wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Space emoji picker downloads its emoji list from a CDN the first time it opens. Offline, or on a network that cannot reach that CDN, the picker shows "Couldn't load emoji" and no emoji can be chosen.
Cause
The picker was pointed at
cdn.jsdelivr.netfor its data and the app carried no copy of its own.Fix
The app now ships the list.
emojibase-datais a dev dependency, pinned to18.0.0(MIT). A small Vite plugin copies the list and its labels for the picker's ten languages next toindex.htmlon build (about 8 MB), and serves the same files from the dev server. It is used by both the desktop and the web config.No visual change.
Test fixture:
buildConfig.test.tsbuilds from a copy of the Vite config, so it now copies the two modules the config imports. It also copies one source file the fixture was missing, which made two of its tests fail onmain.Testing
vitest run test/unit/shared/emojiData.test.ts test/unit/components/Home test/unit/electron/buildConfig.test.ts: 16 files, 112 tests passed.vite buildon a fixture and checks thatdist/emojibase/en/data.jsonanddist/emojibase/zh-hant/messages.jsonexist.package.json.npm run type-checkand ESLint on the changed files pass.Not verified: the picker has not been opened in a packaged app. To check, open a Space's emoji picker with the network off; the emoji should appear and the console should not show
Could not read the bundled emoji list.