Add switch button Icon#1
Closed
AshutoshKhadse23 wants to merge 344 commits intoAshutoshKhadse23:mainfrom
Closed
Conversation
|
It looks like you've made a PR in the wrong direction; you want the destination to be |
With #996, these tests will have to start checking for separate per-platform flavors of alert dialog. Best if they all do so through this one codepath.
This is nice and explicit compared to the behavior I got when I simply forgot to call `testBinding.globalStore.add` when working on some upcoming tests.
This logic is sort of complicated, and duplicated from upstream. Better to put it centrally in our ZulipAppBar wrapper, instead of in message_list.dart. As a bonus, we also have it handle `actions` instead of assuming there are none.
The Center's child is a Column with the message list and possibly a compose box. Since the Column has the default MainAxisSize.max, it occupies all available vertical space, so the Center is a no-op on the vertical axis. (If an element occupies all available space on an axis, it has only one possible position on that axis, so the Center can't affect its position.) It turns out that the Column always takes all horizontal space, too; the message-list and compose-box widgets both stretch to the full screen width. This is appropriate because they need to handle the horizontal device insets in different ways: the former by keeping visible UI outside the insets; the latter by filling the insets with padding. So the Center is a no-op in the horizontal direction, too. It's a relic from the very early prototype in late 2022 (see commit b22ef67); remove it. Also, with some new comments and dartdoc, make it clearer that the Column takes the full screen width.
…button (We're already doing what the new comment says.)
Earlier I'd tried adding this "apt install" command directly in the test registry, as a "setup" line in the "zulip.test" file: flutter/tests#441 But the Flutter "customer testing" suite gets run in two different environments; and it turns out that not only does the LUCI environment not need this step (the Zulip tests there were working fine right up until they were disabled last week due to the failures in GitHub Actions), but it also doesn't permit it: there's no access to `sudo`: https://discord.com/channels/608014603317936148/1290464157765865552/1331449169830871122 https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20customer_testing/22301/overview Error output (reformatted): Processing ./../../bin/cache/pkg/tests/registry/zulip.test... >> sudo apt install -y libsqlite3-dev | sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper ERROR: Setup command failed: sudo apt install -y libsqlite3-dev So we need this bit of conditional logic too. That makes this a little more complex than fits in a "setup" line in the test registry. So instead let's make this script which we can invoke from there.
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
We could pass realmUrl when initializing the `_LoadingPlaceholderPage`, but that will still require a check for the existence of the account. The loading page will be blank when the account does not exist. The user can't easily reach this page because they can only logout from `ChooseAccountPage`, until we start invalidating API keys. Even then, they will only see the blank page briefly before getting navigated, so we should not show any text at all. Fixes: #1219 Signed-off-by: Zixuan James Li <zixuan@zulip.com>
And update Flutter's supporting libraries to match.
…pare` To test showing the topic action sheet from the message list (app bar or recipient header), we don't need `store.addMessage`; in those cases, the message data comes via MessageListView's message fetch. To test showing the action sheet from the Inbox, we do need a message ID to be in the Unreads data. So, arrange that, but only in the tests (one test) that use the Inbox. While we're at it, also make this setup represent the common case where we don't have the full Message object because a message list containing the message hasn't been opened yet. When we write tests for the upcoming resolve/unresolve button in the topic action sheet, that's a case we'll want to exercise, in addition to the case where we do have the message details.
This `prepare` function would also be useful for some tests outside the 'showTopicActionSheet' group. Give it these params to start getting it ready to move to the outer scope. We'll add more params in the next few commits.
For the sake of some new callers when we move this function definition to an outer scope.
For the sake of some new callers when we move this function definition to an outer scope.
For the sake of some new callers when we move this function definition to an outer scope.
…nSheet Just to make this logic more similar to a `prepare` function in a different group, to prepare (heh) for moving that `prepare` function out and reusing it here.
Any of this function's new params (isChannelSubscribed, isChannelMuted, visibilityPolicy, and zulipFeatureLevel) might come in useful as we continue to add to the topic action sheet.
Which is given the value `eg.stream()`, too, anyway.
Implemented new design for @-mention autocomplete items. Added new `contextMenuItemLabel` and `contextMenuItemMeta` color variables to `designVariables` class. Fixes: #913 Co-authored-by: Zixuan James Li <zixuan@zulip.com> Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Fix some wrong color variables that were assigned to the contextMenuItemText field.
This follows the new design for user-mention results, but adapted for emoji based on the design for the emoji picker. See comment for details.
And update Flutter's supporting libraries to match.
This results in the emitted code getting the new "tall" style, which the Dart formatter added in order to get the Flutter project on board with using the formatter. See changelog: https://pub.dev/packages/dart_style/changelog#300 An upcoming Pigeon upgrade requires the upgraded dart_style, prompting us to take this update. This commit was produced by editing pubspec.yaml, then: $ flutter pub get $ tools/check --all-files --fix pigeon $ tools/check --all-files --fix build_runner $ tools/check --all-files --fix drift (Plus a temporary commit before the build_runner step, because build_runner would otherwise clobber part of pigeon's output.)
Changelog: https://pub.dev/packages/pigeon/changelog#2421 Both of the breaking changes would cause compile errors if they affected us. This commit is the result of running these commands: flutter pub upgrade --major-versions pigeon ./tools/check pigeon --all-files --fix [greg: split dart_style upgrade to separate commit; added reading of changelog]
This commit result of running the following command: flutter pub upgrade --major-versions file_picker Changelogs: https://pub.dev/packages/file_picker/changelog#902 The breaking changes are confined to macOS and web. [greg: added reading of breaking changes]
This commit is result of following commands: flutter pub upgrade --major-versions firebase_messaging firebase_core pod update --project-directory=ios/ pod update --project-directory=macos/ Changelogs: https://pub.dev/packages/firebase_core/changelog#3121 https://pub.dev/packages/firebase_messaging/changelog#1524 Notable changes include bump to Firebase Android BoM (33.7.0 to 33.9.0) and Firebase iOS SDK (11.6.0 to 11.8.0), changelog for those are at: https://firebase.google.com/support/release-notes/android https://firebase.google.com/support/release-notes/ios Only one change on iOS for FCM component (only one we use): firebase/firebase-ios-sdk#14355
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
instead of reading TopicName.displayName Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
While this appears to be a user facing change, it's not visible yet, not until TopicName.displayName becomes nullable. This is a part of a series of changes to handle empty topics. Signed-off-by: Zixuan James Li <zixuan@zulip.com>
…ears While this appears to be a user facing change, it's not visible yet, not until TopicName.displayName becomes nullable. This is a part of a series of changes to handle empty topics. Signed-off-by: Zixuan James Li <zixuan@zulip.com>
…ppears While this appears to be a user facing change, it's not visible yet, not until TopicName.displayName becomes nullable. This is a part of a series of changes to handle empty topics. Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Icon taken from the Figma design: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=3512-7&t=FEydAZe5DNKVlKnV-0 Fixes: #1357
This contains a fix for simolus3/drift#3384. Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
These were supposed to be updated in commit fc80be1 where we replaced loadGlobalStore with getGlobalStore. `LiveGlobalBindings.load` is the only thing left analogous to the previously referred to `loadGlobalStore` method. To avoid direct referencce to this specific implementation on `GlobalStore`, mention that loading it for the first time is expected to be asynchronous instead. Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Later we will add more required parameters to TestGlobalStore. Signed-off-by: Zixuan James Li <zixuan@zulip.com>
To add integration tests for global store with sqlite, we might want to switch to LiveGlobalStore, or at least make part of it testable with an in-memory database (like we do for database_test.dart). Leaving that to the future. Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
This will use generic Material-style controls on Android, and generic iOS-style controls on iOS. This does not aim to fully implement the draft design for the settings page. We offer it mainly to test settings, so the implementation is kept as simple as possible. Draft design for reference: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=446-21372&t=BZKpTQPSiBDNxwvB-0 Fixes: #1216 Signed-off-by: Zixuan James Li <zixuan@zulip.com>
AshutoshKhadse23
pushed a commit
that referenced
this pull request
Dec 27, 2025
I happened to notice this message getting printed repeatedly in the
debug logs (reformatted a bit):
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception:
NetworkException: HTTP request failed. Client is already closed.
(ClientException: HTTP request failed. Client is already closed.,
uri=https://chat.zulip.org/api/v1/users/me/presence)
#0 ApiConnection.send (package:zulip/api/core.dart:175)
<asynchronous suspension>
#1 Presence._maybePingAndRecordResponse (package:zulip/model/presence.dart:93)
<asynchronous suspension>
#2 Presence._poll (package:zulip/model/presence.dart:121)
<asynchronous suspension>
That'd be a symptom of an old Presence continuing to run its polling
loop after the ApiConnection has been closed, which happens when the
PerAccountStore is disposed. Looks like when we introduced Presence
in 5d43df2 (zulip#1619), we forgot to call its `dispose` method.
Fix that now.
The presence model doesn't currently have any tests. So rather than
try to add a test for just this, we'll leave it as something to
include when we write those tests, zulip#1620.
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.
Here I add also added the switch account button and placed at single location with my profile.
Like provide in the image
Related zulip#1178