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

Add tooltip to KeyValueGridView #1399

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

marianaSchibsted
Copy link

@marianaSchibsted marianaSchibsted commented Feb 12, 2025

Why?

A tooltip was requested on the Mobility Item Page to provide brief explanatory text for a specific specification.

What?

  • Added new optional infoTooltip property in KeyValuePair.

Tooltip implementation in KeyValueGridView:

  • Displays an info icon next to the specification if infoTooltip is present.
  • Shows a tooltip with infoTooltip content on click.
  • Dismiss the tooltip on info icon click or on click on tooltip it self.

Version Change

Minor

UI Changes

Before After
simulator_screenshot_A7DF18E9-11DD-49FD-8F00-20B39862F965 simulator_screenshot_8A560A75-177F-4172-96E8-A71EEFFC01B5

@marianaSchibsted marianaSchibsted self-assigned this Feb 12, 2025
@bstien
Copy link
Member

bstien commented Feb 12, 2025

How does this look in the app if you show it on the itempage, and then scroll the screen? Does the tooltip scroll alongside, or is it "stuck" in its initial position?

Comment on lines +104 to +106
let infoButton = UIButton(type: .custom)
infoButton.setImage(Warp.Icon.info.uiImage, for: .normal)
infoButton.translatesAutoresizingMaskIntoConstraints = false
Copy link
Member

Choose a reason for hiding this comment

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

There's no label for VoiceOver users for this button. How should the button and the presentation work for them?

@marianaSchibsted
Copy link
Author

How does this look in the app if you show it on the itempage, and then scroll the screen? Does the tooltip scroll alongside, or is it "stuck" in its initial position?

It looks like this. And I am not able to scroll until I close the tooltip (by clicking on any part of the screen

ScreenRecording_02-12-2025.13-33-02_1.MP4

infoButton.setImage(Warp.Icon.info.uiImage, for: .normal)
infoButton.translatesAutoresizingMaskIntoConstraints = false
infoButton.accessibilityLabel = pair.infoTooltipAccessibilityLabel
NSLayoutConstraint.activate([
Copy link
Author

Choose a reason for hiding this comment

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

@bstien Like this?

@marianaSchibsted marianaSchibsted marked this pull request as draft February 13, 2025 09:17
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