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)
Fri, Feb 23, 07:58
Unknown Object (File)
Fri, Feb 23, 07:58
Unknown Object (File)
Tue, Feb 13, 15:19
Unknown Object (File)
Thu, Feb 8, 07:38
Unknown Object (File)
Thu, Feb 8, 05:56
Unknown Object (File)
Thu, Feb 8, 05:29
Unknown Object (File)
Jan 26 2024, 11:49
Unknown Object (File)
Jan 24 2024, 09:45

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);