Skip to content

Add "help" icon so users can find their Zulip server URL; fix some button styles#2320

Open
chrisbobbe wants to merge 11 commits into
zulip:mainfrom
chrisbobbe:pr-server-url-help-and-icon-button
Open

Add "help" icon so users can find their Zulip server URL; fix some button styles#2320
chrisbobbe wants to merge 11 commits into
zulip:mainfrom
chrisbobbe:pr-server-url-help-and-icon-button

Conversation

@chrisbobbe
Copy link
Copy Markdown
Collaborator

@chrisbobbe chrisbobbe commented May 14, 2026

Fixes #109.

Notable commit message:

login: Link to doc to help users understand what their "server URL" is

Fixes #109.

Done with an icon button, rather than an inline link in the help
text (as I think we'd envisioned at first), because that could be an
annoyingly small touch target, and right next to the "Continue"
button so easy to mis-tap.

The question-mark icon opens https://zulip.com/help/logging-in#find-the-zulip-log-in-url and its tooltip is "Help".

Before After
image image
image image

Other button styles touched here:

Before After
Screenshot 2026-05-13 at 9 04 28 PM Screenshot 2026-05-13 at 9 14 11 PM
Screenshot 2026-05-13 at 9 02 13 PM Screenshot 2026-05-13 at 9 06 15 PM
Screenshot 2026-05-13 at 9 02 28 PM Screenshot 2026-05-13 at 9 06 27 PM
Screenshot 2026-05-13 at 9 02 46 PM Screenshot 2026-05-13 at 9 06 43 PM
Screenshot 2026-05-13 at 9 02 58 PM Screenshot 2026-05-13 at 9 06 57 PM
Screenshot 2026-05-13 at 9 33 32 PM Screenshot 2026-05-13 at 9 32 42 PM
Screenshot 2026-05-13 at 9 33 43 PM Screenshot 2026-05-13 at 9 32 49 PM

Saves churn on neighboring lines when a dartdoc changes.

The convention comes from review feedback elsewhere:
  zulip#2279 (comment)
Before this, we were accidentally doing touch feedback in two
overlapping ways:

- the state-based colors from the Figma, which caused the color to
  change correctly but with no animation.
- an animated color change with a translucent overlay, because we
  didn't cancel out the Material-default overlayColor by passing
  Colors.transparent for that. The animation is nice, but the color
  was chosen from Material defaults (as a transformation of the
  foreground/label color), and this meant accidentally deviating
  from the Figma.

Instead, just do it one way: with overlayColor, so that we keep the
animation. But use some arithmetic to make it match the Figma
colors.
These cases previously used `someDesignVariable.withAlpha(0)`,
keeping the variable's RGB while zeroing the alpha. But the result's
RGB never matters: the static background paints as fully transparent,
and `_overlayFor` only reads `base.a`, never `base.rgb` (its returned
color carries `target`'s RGB). So `Colors.transparent` is equivalent.
I made this by copying /web/icons/help.svg, then iterating with
Claude to harmonize it with our `info` icon, matching the size and
stroke width of the outer circle.

I'd be happy to have this replaced by something from a human
designer, but I expect Vlad probably doesn't have the bandwidth
right now.
This will mean much less duplicated code when we reorient
ZulipIconButton around the icon-button component in the Figma's
Zulip Web UI Kit.
This commit is NFC because it turns out that ZulipIconButton doesn't
actually have any callers anymore! See 4b42f7a, where the last
(possibly only ever?) caller was removed. It was a three-dots button
in the "All channels" page that we removed because things looked
cluttered.

So we're free to change this without disrupting existing UI. There
are a few callers in tests, which end up changing just a bit; I've
made the `tooltip` param required, which helps with accessibility
because the tooltip text propagates to a Semantics label.

This new version is based on an "icon button" component in the Zulip
Web UI Kit, which sits next to the "Button" component on the same
Figma frame, which backs our ZulipWebUiKitButton widget. The two
components use the same color palette, so it's natural and
convenient for ZulipIconButton to share coloring code with
ZulipWebUiKitButton.

Also, expand the dartdoc of `baseFilledInputDecoration` with a good
use case for this widget, which we'll demonstrate next.
@chrisbobbe chrisbobbe requested a review from rajveermalviya May 14, 2026 04:35
@chrisbobbe chrisbobbe added maintainer review PR ready for review by Zulip maintainers product review Added by maintainers when a PR needs product review labels May 14, 2026
@karlstolley
Copy link
Copy Markdown

Visual changes look good to me!

Has there been a discussion about the "This is the address you use to open Zulip in a browser" string? Not sure if that can be clarified further, and whether it's worth showing a prefix-less "zulip.example.org" placeholder--though I'm guessing that prefix probably gets stripped off?

@chrisbobbe
Copy link
Copy Markdown
Collaborator Author

chrisbobbe commented May 14, 2026

Ah no, that string hasn't been discussed anywhere; definitely open to suggestions.

I'm not sure what prefix you're referring to, but we do already offer the hint text "your-org.zulipchat.com" when you've focused the input but not typed anything yet (you can try this yourself in the released app):

In my screenshots in the PR description, I had typed "chat.zulip.org" into the input.

Fixes zulip#109.

Done with an icon button, rather than an inline link in the help
text (as I think we'd envisioned at first), because that could be an
annoyingly small touch target, and right next to the "Continue"
button so easy to mis-tap.
@chrisbobbe chrisbobbe force-pushed the pr-server-url-help-and-icon-button branch from a0f026a to 2b29aec Compare May 14, 2026 19:11
@chrisbobbe
Copy link
Copy Markdown
Collaborator Author

Updated the helper text:

This is the address you would use to open Zulip in a browser.

Light Dark
image image

Copy link
Copy Markdown
Member

@rajveermalviya rajveermalviya left a comment

Choose a reason for hiding this comment

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

Thanks @chrisbobbe! All LGTM, just one nit below.

Comment thread lib/widgets/button.dart

/// Make an [Icon] for an [IconData],
/// uniformly for [icon] and (when specified) [selectedIcon].
Icon _buildIcon(IconData data) => Icon(data);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Is this helper method set up to expand in future, otherwise currently it just emits Icon() which could just be inlined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer review PR ready for review by Zulip maintainers product review Added by maintainers when a PR needs product review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

login: Link to doc to help users understand what a "server URL" is and how to find theirs

3 participants