Page MenuHomePhorge

Fix the issue about persistent chat setting icon being clickable when the chat is collapsed
Needs ReviewPublic

Authored by roberto.urbani on Aug 30 2023, 12:43.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 18:55
Unknown Object (File)
Thu, Apr 11, 10:23
Unknown Object (File)
Wed, Apr 10, 23:59
Unknown Object (File)
Tue, Apr 9, 20:23
Unknown Object (File)
Mon, Apr 8, 22:18
Unknown Object (File)
Mon, Apr 8, 22:11
Unknown Object (File)
Sun, Mar 31, 20:55
Unknown Object (File)
Sun, Mar 31, 20:55

Details

Summary

The persistent chat, as mentioned in ref T15626, when collapsed, still has an invisible gear icon on the left of the upper arrow icon. It should not be there. This fix removes the core-menu-item class if the chat is minimized and add it back when expanded.

Test Plan

Follow the steps in task ref: T15626 and now the context menu should not be triggered when clicking on the left of the upper arrow

Diff Detail

Repository
rP Phorge
Branch
task-T15626 (branched from master)
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 820
Build 820: arc lint + arc unit

Event Timeline

Check out https://we.phorge.it/book/contrib/article/javascript_coding_standards/ and the Javeline docs here: https://github.com/phacility/javelin/tree/master/src/docs/concepts
(I'll try to render the Javeline guide here later).

  • We don't use document.querySelector - we use JX.DOM.find, you can see an example in line 43
  • the else should be in the same line as the }.
  • We don't use document.querySelector - we use JX.DOM.find, you can see an example in line 43

It seems undocumented also in the mentioned guide 🤔

Anyway we can also avoid to manually manage with two classlists, and adopt this oneline instead, just like line 66.

JX.DOM.alterClass(clickable_gear_element, 'core-menu-item', !userMinimize);

Thanks Roberto. If you have not time to follow-up, no problem. We can help to re-patch.