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

dev/user-interface#60 Fixes UI regression & makes more accordions accessible #29533

Merged
merged 5 commits into from
Mar 1, 2024

Conversation

vingle
Copy link
Contributor

@vingle vingle commented Feb 28, 2024

While testing @aydun's #29447, I discovered a CSS-based UI regression from the CSS changes in 5.69: accordions using the .crm-collapsible pattern (of which I've found 9) don't change the expand/close caret icon on open close. The accordions still work, but the triangle is set to open position, even when the accordion is closed.

Rather than just fix this with CSS, I figured this was a good chance to replace the pattern with the more accessible markup pattern. Between this and Aidan's PR, this would only leave a handful of non-accessible accordions left.

Overview

I've gone thru all but one of the instances of .crm-collapsible for accordions and replaced with <details><summary> using .crm-accordion-light where appropriate to try to match the original UI. Have tested each, and checked for related JS in the template files that might now error out.

Before

image

After

image

Technical details

I've added container <div class="crm-accordion-body"> where that didn't exist. In one instance I've moved a region that was ins

Comments

Testing template files can take a bit of detective work to find them in the UI, so here's the paths for each:

Copy link

civibot bot commented Feb 28, 2024

🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷

Introduction for new contributors...
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers...

➡️ Online demo of this PR 🔗

@civibot civibot bot added the master label Feb 28, 2024
Copy link

civibot bot commented Feb 28, 2024

No issue was found matching the issue reference given in the pull request title. Please check the syntax.

@highfalutin
Copy link
Contributor

Currently reviewing; tracking manual testing at https://lab.civicrm.org/dev/user-interface/-/issues/67#testing-29533

@vingle
Copy link
Contributor Author

vingle commented Feb 29, 2024

One note when reviewing this: @colemanw fixed one of these last week (#29446) and decided in the end it didn't need to be an accordion at all as so little was revealed – that's an alternative path with these.

@shaneonabike
Copy link
Contributor

Hi Nicol,

Quick question: I noticed that for custom_groups in Event Registration it is not converting the pre-existing divs to a details/summary combo. I tried manually changing it and things work. I just wanted to checkin about that (and perhaps it's just in another PR?)

Selection_010

cc @vingle

@vingle
Copy link
Contributor Author

vingle commented Feb 29, 2024

@shaneonabike
Copy link
Contributor

Good to go from Wordpress perspective extra for the extra class you added causing theming issues. If you fix that I'm good on this point to merge.

cc @vingle

@highfalutin
Copy link
Contributor

I reviewed the first three changes at https://lab.civicrm.org/dev/user-interface/-/issues/67#testing-29533. The API v3 Explorer change breaks the interface, so IMO we should remove that one. The Case View one creates some extra (kind of ugly) borders around the detail content. I'll try to make a commit that fixes these.

@vingle
Copy link
Contributor Author

vingle commented Feb 29, 2024

Thanks alot @highfalutin - I hadn't seen the API3 issues.

The css border was on my radar and I was waiting for the accordions to be merged before putting in a css tidy-up. But there's no harm in making that PR now: #29551. It fixes both the border that is mistakenly inherited from .crm-accordion-bold and adds a tiny bit of breathing space between multiple accordions, similar to how it was previously.

@vingle
Copy link
Contributor Author

vingle commented Mar 1, 2024

Good to go from Wordpress perspective extra for the extra class you added causing theming issues. If you fix that I'm good on this point to merge.

@shaneonabike - are you able to give a bit more details/screengrab? The new classes are in civicrm.css, which WordPress loads, is this specific to CAU? Quite a few of the new classes have been added there by Christian.

@highfalutin
Copy link
Contributor

@vingle @herbdool thanks for fixing the border and spacing issues! I'm about to respond to @vingle's feedback on my PR 13.

@highfalutin
Copy link
Contributor

So at this point, I've reviewed and approved/submitted fixes for the first 3 files; Shane has reviewed and approved the rest. Once Nic merges my changes (13), this PR can be merged.

@shaneonabike
Copy link
Contributor

Good to go from Wordpress perspective extra for the extra class you added causing theming issues. If you fix that I'm good on this point to merge.

@shaneonabike - are you able to give a bit more details/screengrab? The new classes are in civicrm.css, which WordPress loads, is this specific to CAU? Quite a few of the new classes have been added there by Christian.

No I wrote a review point but it was still in pending -- I didn't realize I needed to submit it - 😱 . Anyway you'll need the slight change. Other than that you are totally good from my testing on WP.

cc @vingle

@vingle
Copy link
Contributor Author

vingle commented Mar 1, 2024

Thanks @highfalutin, @shaneonabike & @herbdool – the API3 fix is merged, and the email signature issue should be fixed when #29448 (or the part of it relating to the contact page, which has passed tests) is merged.

@highfalutin
Copy link
Contributor

@colemanw test failures are unrelated since this pr only touches . tpl files

@@ -144,11 +144,12 @@
</tr>
</table>
{include file="CRM/Contact/Form/Task/EmailCommon.tpl" upload=1 noAttach=1}
</div>
</fieldset>
</div><!-- /.crm-accordion-body -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<nitpick>
I don't mean to be a pain... but I really don't like these comments. It's 2024 and we all know what a closing tag is.
</nitpick> <!-- end of nitpick -->

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, especially as it sits next to the closing details tag (or should be). Perhaps at the end of this there can be a civi wide cleanup of <!-- /.crm-accordion-wrapper --> & `?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Ideally this PR wouldn't be adding new ones that we then have to cleanup.
But if that's easier then ok I can merge this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those comments are now removed for all the templates in #29448

@colemanw colemanw merged commit be79fbb into civicrm:master Mar 1, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants