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

Display short URL when not editing #2357

Merged
merged 6 commits into from
Jan 23, 2024
Merged

Display short URL when not editing #2357

merged 6 commits into from
Jan 23, 2024

Conversation

dus7
Copy link
Contributor

@dus7 dus7 commented Jan 19, 2024

Task/Issue URL: https://app.asana.com/0/1206226850447395/1205485701057249

Description:
Displays a short URL (hostname without www component), while browsing. While short URL is displayed, the text alignment is adjusted to the center.

Steps to test this PR:

  1. Open a new tab
  2. Observe leading side address bar placeholder alignment
  3. Browse to any URL (except DDG SERP)
  4. Observe short URL in the address bar, vertically centered
  5. Start editing
  6. Observe complete URL, selected, aligned to the leading side

Theme Testing:

  • Light theme
  • Dark theme

@dus7 dus7 marked this pull request as ready for review January 19, 2024 11:10
}
}

static func deemphasisePath(forUrl url: URL) -> NSAttributedString {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we need this now do we? The point of this was to make everything after the first slash slightly lighter but we're not showing that any more. When the user is editing it should all be the same colour anyway imo (I don't think anyone expects the text to be demphasised while editing).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had mixed feelings about this part too, but ended up leaving it as it is since the text appearance was not updated while editing - that made me believe it’s intentional behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed: 84be4ea

Copy link
Contributor

@brindy brindy left a comment

Choose a reason for hiding this comment

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

Works good, but I don't think we need the de-emphasis anymore. That's only shown when editing and I don't think anyone expects that while editing.

Copy link
Contributor

@brindy brindy left a comment

Choose a reason for hiding this comment

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

LGTM :)

@dus7 dus7 merged commit fc8c078 into main Jan 23, 2024
11 checks passed
@dus7 dus7 deleted the mariusz/strip-url branch January 23, 2024 12:45
dus7 added a commit that referenced this pull request Mar 13, 2024
dus7 added a commit that referenced this pull request Mar 15, 2024
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