Take the host's theme and language on every screen - #16
Merged
Merged
Conversation
flutter_html 3.0.0 calls a query-selector function html 0.15.7 removed. The package resolved 0.15.7, so anything importing ReplyThread failed to compile; no test imported a screen, so CI never saw it. Hosts already pin 0.15.6 by hand. Also clears the analyzer's remaining infos in these files (null-aware map entries, the redundant library name).
Providers stored fixed English errors ("Failed to load tickets."), which
French and Spanish apps showed as they were. They now record a translation
key, and keep a server's own message only for a request it refused (4xx);
a 5xx body or a missing response gets the key.
AppLocalizations looks a key up in the regional table first (fr_CA, which
overrides fr where Canadian usage differs), then the language, then
English, and passes text that is not a key through unchanged. Adds tf()
for placeholders and locale-aware date helpers.
The ticket screens were off-brand inside host apps: the new-ticket button came out in Material 3's pale primaryContainer, references and links in a fixed indigo, and surfaces, text and borders in Escalated's own greys. They now read the app's ThemeData throughout -- primary, surface tones, onSurface/onSurfaceVariant, outlineVariant, error -- and the button uses the host's FAB theme, else its primary. Status, priority and SLA badges keep their meaning colours. Remaining English strings (field-required, None, SLA, the create-ticket failure) are translated, error views translate the provider's key, and dates follow the app locale instead of always formatting in English. The same colour change applies to the auth, knowledge-base, guest and settings screens.
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.
Inside host apps the ticket screens were off-brand and partly English: a pale aqua new-ticket button (Material 3's
primaryContainer), indigo references and links, and "Failed to load tickets." inside a French UI.Theme -- every screen and widget reads the app's
ThemeData:primary, thesurface/surfaceContainer*tones,onSurface/onSurfaceVariant,outlineVariant,error/onError. The new-ticket button uses the host'sfloatingActionButtonTheme, elseprimary/onPrimary. Status, priority and SLA badges keep their fixed meaning colours. NoisDark ? AppColors.x : AppColors.yleft in screens or widgets.Language
failed_to_load_tickets,unexpected_error, ...) instead of English; a server's ownmessageis kept only for a request it refused (4xx). Error views and the auth screens translate what they are given;AppLocalizations.tpasses non-key text through.fr_CAtable that overridesfrwhere Canadian usage differs (courriel). Lookup: region, then language, then English.yMMMd) instead of fixed English formats.Build -- holds
htmlbelow 0.15.7: flutter_html 3.0.0 does not compile against it, and the package resolved it, so nothing importingReplyThreadbuilt. No test imported a screen until now.Verification --
flutter analyze: no issues (was 91 infos).flutter test: 21 passed, including widget tests for a French load failure, FAB and reference colours under a teal host theme, a host FAB theme winning, and French dates. README documents theming and localization.