LinkMenu opening to right with fluent linkmenu strings
Categories
(Firefox :: New Tab Page, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | verified |
People
(Reporter: pdahiya, Assigned: pdahiya)
References
(Blocks 1 open bug)
Details
(Keywords: github-merged)
Attachments
(2 files)
Steps to replicate
- Reduce window size till horizontal scroll appears
- Click on context menu button
Expected Result
Link Menu should open to left
Actual result
- Link menu open to right and container element has missing last-item class
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Looks like this issue happened with commit https://github.com/mozilla/activity-stream/pull/5083/commits/7f17dcaee788394988c1af7eb1b389d62b58fd23
This issue happens in DS where we check horizontal scroll before settings last-item that controls link menu direction https://github.com/mozilla/activity-stream/blob/fluent/content-src/components/DiscoveryStreamComponents/DSLinkMenu/DSLinkMenu.jsx#L37
With Fluent we have changed code to translate string at runtime inside ContextMenu https://github.com/mozilla/activity-stream/pull/5083/commits/7f17dcaee788394988c1af7eb1b389d62b58fd23#diff-7eb9a4f70bea4698b1dd49611bfeae49R112
instead of passing translated string as option.label
https://github.com/mozilla/activity-stream/pull/5083/commits/7f17dcaee788394988c1af7eb1b389d62b58fd23#diff-7eb9a4f70bea4698b1dd49611bfeae49R112
Assignee | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
The scrollMaxX
approach is not ideal as it probably forces a synchronous reflow. We could probably check the position of the context menu button itself after it renders and perhaps from a requestAnimationFrame
so that when the context menu is rendered, it'll set the class correctly as it renders.
On the other hand, opening a context menu is probably not a performance bottleneck to optimize too much for.
Comment 4•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Updated•5 years ago
|
Comment 6•5 years ago
|
||
I have verified that this issue is no longer reproducible with the latest Firefox Nightly (69.0a1 Build ID - 20190630214222) installed, on Windows 10 x64, Arch Linux and Mac 10.14.5. Now the context menu is opened to the left.
Description
•