Closed Bug 1948671 Opened 1 year ago Closed 1 year ago

[composable toolbar] Build a Text composable with support for faded overflow text at the start and at the end

Categories

(Firefox for Android :: Toolbar, task, P2)

All
Android
task

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: petru, Assigned: harrisono)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group3][composable toolbar])

Attachments

(3 files)

Attached image image.png

Currently the display URL's overflow (the end of it) is faded away.
For Phase 2 of the toolbar redesign we need to be able to show the last part of the URL while fading out the beginning (design attached).
This configuration needs to be supported in the pageOrigin configuration of DisplayState and then rendered as expected.

Blocks: ct-foundational
No longer blocks: 1948591
Assignee: nobody → hoglesby
Status: NEW → ASSIGNED

Seeing the proposed patch I think the fade functionality could be split between

  • the new text composable which can be configured to
    • clip the start part or the end part of the text if it doesn't fit the available space
    • fade the start or the end of the text if it doesn't fit the available space
  • a fading edge Modifier used by this ^^ which could also easily add a gradient (with configurable colors, size and gravity) to any composable.
    This could be nice to have for other features later and would bring us closer to the fading edge support normal Views have.
    Added a screenshot of the APIs normal views have that we should probably also support. For now I think it's okay for this Modifier to support only start & end gradients.
Attachment #9470136 - Attachment description: WIP: Bug 1948671 - Create FadingFrontTruncatedText composable → WIP: Bug 1948671 - Create FadedTruncatedText composable
Attachment #9470136 - Attachment description: WIP: Bug 1948671 - Create FadedTruncatedText composable → WIP: Bug 1948671 - Create FadedText composable
Attachment #9470136 - Attachment description: WIP: Bug 1948671 - Create FadedText composable → Bug 1948671 - Create FadedText composable
Pushed by hoglesby@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5d99ae483c0f Create FadedText composable r=android-reviewers,tchoh
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: