Page MenuHomePhorge

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

Authored by roberto.urbani on Aug 30 2023, 12:43.

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.

Thanks again Roberto.

I've explored a bit this change and we already had a CSS that was designed to toggle that icon, but it was incomplete/broken.

So this has become a one-line CSS change:

D25628: Persistent Chat: fix de-minimize misclick

Feel free to check if the proposed counter-patch still fixes your problem. I tested and it seems yes to me.

valerio.bozzolan added a reviewer: roberto.urbani.

Commanding to set as abandoned. Thanks again! Well done for your original troubleshooting.

valerio.bozzolan foisted this revision upon roberto.urbani.
valerio.bozzolan edited reviewers, added: valerio.bozzolan; removed: roberto.urbani.