Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] close collapse when opening a dropdown #43891

Merged

Conversation

hans2103
Copy link
Contributor

@hans2103 hans2103 commented Aug 7, 2024

Pull Request for Issue #28952 .

Summary of Changes

This PR will add some javascript.
When you click on a dropdown element (data-bs-toggle="dropdown") , all open collapse elements (data-bs-toggle="collapse") will close

Testing Instructions

  • Joomla 4.4-dev with demo data
  • resize viewport to mobile
  • toggle any of the three buttons in the footer to open / close the element
  • see the issue as shown in the first screencapture movie
  • run npm ci to compile both css and js
  • toggle any of the three buttons in the footer to open / close the element
  • see the issue as shown in the second screencapture movie

Actual result BEFORE applying this Pull Request

Screen.Recording.2024-08-07.at.11.10.00.mov

Expected result AFTER applying this Pull Request

Screen.Recording.2024-08-07.at.11.44.36.mov

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on 3d7b7df


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43891.

@richard67
Copy link
Member

@hans2103 Please fix the javascript cs issues reported here https://ci.joomla.org/joomla/joomla-cms/77860/1/33 :

/drone/src/build/media_source/templates/administrator/atum/js/template.es6.js
  251:25  error  Expected parentheses around arrow function argument  arrow-parens
  252:36  error  Unexpected unnamed function                          func-names
  252:36  error  Unexpected function expression                       prefer-arrow-callback
  253:29  error  Expected parentheses around arrow function argument  arrow-parens
  256:22  error  Missing trailing comma                               comma-dangle

@hans2103
Copy link
Contributor Author

hans2103 commented Aug 7, 2024

@richard67 lint:js issue have been fixed
@brianteeman please feel free to test again. (same goes for the rest of the world, but you are faster)

…6.js

Co-authored-by: Brian Teeman <brian@teeman.net>
@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on c3a925f


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43891.

@exlemor
Copy link

exlemor commented Aug 8, 2024

I have tested this item ✅ successfully on c3a925f

I have tested this successfully... :)

( Thanks for this fix, I sometimes have to use my mobile phone and this will help! )


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43891.

@Quy
Copy link
Contributor

Quy commented Aug 8, 2024

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43891.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 8, 2024
@laoneo laoneo merged commit 2284c09 into joomla:4.4-dev Aug 9, 2024
4 checks passed
@laoneo
Copy link
Member

laoneo commented Aug 9, 2024

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 9, 2024
@laoneo laoneo added this to the Joomla! 4.4.7 milestone Aug 9, 2024
@hans2103 hans2103 deleted the feature/close-collapse-when-opening-dropdown branch August 9, 2024 07:13
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Aug 11, 2024
* make sure you click on the button, not any of the children

* close collapse when click to open a dropdown

* fix lint:js issues

* Update build/media_source/templates/administrator/atum/js/template.es6.js

Co-authored-by: Brian Teeman <brian@teeman.net>

---------

Co-authored-by: Brian Teeman <brian@teeman.net>
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Aug 11, 2024
* make sure you click on the button, not any of the children

* close collapse when click to open a dropdown

* fix lint:js issues

* Update build/media_source/templates/administrator/atum/js/template.es6.js

Co-authored-by: Brian Teeman <brian@teeman.net>

---------

Co-authored-by: Brian Teeman <brian@teeman.net>
@Radek-Suski
Copy link
Contributor

Given that accordions are also using data-bs-toggle="collapse" it also causes all accordions tabs to close.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43891.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.4-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants