Closed Bug 1297302 Opened 8 years ago Closed 8 years ago

Fix tooltip of messageCloseButton in toolbox-notificationbox

Categories

(DevTools :: Shared Components, defect, P1)

defect

Tracking

(firefox48 unaffected, firefox49 affected, firefox50 affected, firefox51 verified)

VERIFIED FIXED
Firefox 51
Iteration:
51.3 - Sep 19
Tracking Status
firefox48 --- unaffected
firefox49 --- affected
firefox50 --- affected
firefox51 --- verified

People

(Reporter: magicp.jp, Assigned: dalimil)

References

Details

(Whiteboard: [reserve-html])

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20160822064441

Steps to reproduce:

1. Start Nightly
2. Go to about:home
3. Open DevTools > Canvas
4. Click Reload and Recording => wait until timeout => toolbox-notificationbox appears
5. Check tooltip of messageCloseButton


Actual results:

messageCloseButton tooltip is gone.

Regression range:
https://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=be6dbfceb79e570e6859200c2c5a8673f58c277e&tochange=bec48bfd05a8c6703aab63181441869a3dcaa4cc


Expected results:

Fix tooltip of messageCloseButton in toolbox-notificationbox
Blocks: 1264671
Has Regression Range: --- → yes
Has STR: --- → yes
Component: Untriaged → Developer Tools: Framework
OS: Unspecified → All
Hardware: Unspecified → All
Flags: qe-verify?
Whiteboard: [devtools-html] [triage]
Component: Developer Tools: Framework → Developer Tools: Shared Components
Flags: qe-verify? → qe-verify+
Priority: -- → P3
QA Contact: cristian.comorasu
Whiteboard: [devtools-html] [triage] → [reserve-html]
So in client/shared/components/notification-box.js and function renderNotification(notification) - line 225 or so... When the close button is rendered in the rep component, the 'title' attribute is not specified -> we need to have:         
div({
  className: "messageCloseButton",
  title: 'This line is missing',
  onClick: this.close.bind(this, notification)}
) 
But I don't think we are passing the required tooltip string when creating a new notification, so at the moment I couldn't add it... Is it going to be a fixed string? I assume it also needs to be localized...
Assignee: nobody → dalimilhajek
Status: NEW → ASSIGNED
Flags: needinfo?(jryans)
I am not sure what's intended here, let's check with Honza who added the HTML notification bar.
Flags: needinfo?(jryans) → needinfo?(odvarko)
Summary:

* Crate a new string 'notificationBox.closeTooltip' in components.properties, translated to 'notificationBox.closeTooltip'.
* Load string bundle in notification-box.js
const { LocalizationHelper } = require("devtools/shared/l10n");
const l10n = new LocalizationHelper("devtools/locale/components.properties");
* Create new props in NotificationBox component 'closeButtonTooltip: PropTypes.string'
* Set default value in getDefaultProps, closeButtonTooltip: l10n.getStr("notificationBox.closeTooltip")
* Render new 'title' attribute in reder method:  title: this.props.closeButtonTooltip,

Honza
Flags: needinfo?(odvarko)
(In reply to Jan Honza Odvarko [:Honza] from comment #3)
> Summary:
> 
> * Crate a new string 'notificationBox.closeTooltip' in
> components.properties, translated to 'notificationBox.closeTooltip'.
Sorry, translated to 'Close this message'

Honza
Attached patch Bug1297302.patch (obsolete) (deleted) — Splinter Review
Attachment #8786260 - Flags: feedback?(odvarko)
Comment on attachment 8786260 [details] [diff] [review]
Bug1297302.patch

Review of attachment 8786260 [details] [diff] [review]:
-----------------------------------------------------------------

This is exactly what I had in mind, thanks! 

There is just one comment. Please fix and I'll R+ (assuming try is green)

Honza

::: devtools/client/shared/components/notification-box.js
@@ +53,5 @@
>        // Notification priority; see Priority Levels.
>        priority: PropTypes.number.isRequired,
>  
> +      // Message that should be shown when hovering over the close button
> +      closeButtonTooltip: PropTypes.string,

The prop should be outside of the `notifications` shape (it's prop of the NotificationBox not props of the Notification object).

Honza
Attachment #8786260 - Flags: feedback?(odvarko) → feedback+
Attached patch Bug1297302.patch - rev2 (deleted) — Splinter Review
I fixed the prop location.

Push to try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3850301404e5
Attachment #8786260 - Attachment is obsolete: true
Attachment #8786336 - Flags: review?(odvarko)
Attachment #8786336 - Flags: review?(odvarko) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/733946d6ade3
Fix tooltip of messageCloseButton in toolbox-notificationbox. r=Honza
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/733946d6ade3
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Iteration: --- → 51.3 - Sep 12
Priority: P3 → P1
Verified in 51.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: