- πΊπ¦Ukraine bobi-mel
Hi @darvanen
I will try to solve this problem. However, in order not to waste time, I would like to clarify some details:
1) If possible, please provide an example of the future chart;
2) What behavior do you expect the chart to have?
3) The Acquia slate theme is outdated, what theme will we use to test the results?
4) Add important points to consider while working on the task;
5) Your suggestions for the final result of the assignment.Thank you!
- π¦πΊAustralia darvanen Sydney, Australia
@bobi-mel, answers to your questions:
- I'm sorry but I don't understand what you mean by "chart" here?
- Same issue.
- I think Gin theme has a dark mode and is quite popular, let's see if that meets our needs.
- I don't have any specific points to make, just try to uphold Drupal's values.
As for 5, here's my current vision:
- Replace the current .png images with .svg images with
fill="currentColor"
. - Provide an interface where the admin can set the color of the indicator.
- Write a test for the new feature.
Bonus points for:
- Provide additional built-in glyph options commonly used for dropdowns.
- Create optional integrations with fontawesome β and/or material_icons β (probably better as a follow-up).
I am very happy to discuss if you have different ideas.
- πΊπ¦Ukraine bobi-mel
Hi @darvanen
1) I mean graphic not chart, sorry
2) I will investigate the issue and let you know my ideas to solve it.
- π¦πΊAustralia darvanen Sydney, Australia
@bobi-mel no apology needed, I can see it was just lost in translation.
2: Great, I look forward to hearing your ideas.
- Assigned to bobi-mel
- πΊπ¦Ukraine bobi-mel
Hi @darvanen
I tried to use the Gin theme β , but it is only an admin theme and can't be used for front-end part of the site.
I propose:
1) Add a new 'Dark mode' element to the module config form;
2) Also, Add text field 'Theme class for dark mode', because different themes add different custom classes the Body or HTML tag.
4) Use existing behavior if added theme dark mode class and enabled dark mode for module set the class 'collapsiblock-dark-mode' to the block title;
5) Create two SVG images for each type of arrow: dark and white;
6) By default use dark.
7) Use these arrows - https://www.svgrepo.com/svg/393200/triangle-down-filled as more modern.Let me know what you think about it
- π¦πΊAustralia darvanen Sydney, Australia
Nice ideas @bobi-mel, on the whole I think that sounds good, the only thing I would add is to use form states to make the text field only visible if the checkbox is selected.
I don't see why we can't test it with an admin theme?
- πΊπ¦Ukraine bobi-mel
I thought it over and agree with you the Git theme will be good for a test.
- Merge request !36Issue #936984 by bobi-mel: New graphic for open and close β (Closed) created by Unnamed author
- Merge request !37Issue #936984 by bobi-mel, darvanen: New graphic for open and close. Removed... β (Open) created by Unnamed author
ReINFaTe β changed the visibility of the branch 936984-new-graphic-for to active.
ReINFaTe β changed the visibility of the branch 936984-new-graphic-for to hidden.
- π¦πΊAustralia darvanen Sydney, Australia
@bobi-mel I just took a look and that MR was starting to look quite good, may I ask why you closed it?
- πΊπ¦Ukraine bobi-mel
Hi @darvanen
I have finished working on this task, but I faced the problem of creating and running a pipeline for the last commit for the PHPUnit tests to run with the Gin theme as the testing theme. I had assumed that it was a problem with the GitLab pipeline and hoped that closing it and creating a new merge request would solve it.
Unfortunately, this did not solve the problem.Can you tell me how to start the pipeline for the last commit since I haven't found the cause of the problem yet?
- π¦πΊAustralia darvanen Sydney, Australia
Ah I see!
You'll need to add the gin theme to composer.json as a dev dependency for it to be available to the pipeline.
- Issue was unassigned.
- Status changed to Needs review
6 months ago 11:00am 8 July 2024 - πΊπ¦Ukraine bobi-mel
Thanks for support. It really helped.
See MR - https://git.drupalcode.org/project/collapsiblock/-/merge_requests/37 - π¦πΊAustralia darvanen Sydney, Australia
I've been sick for quite a while, starting to come good, ear-marking this for review as soon as I can.
- π¦πΊAustralia darvanen Sydney, Australia
darvanen β changed the visibility of the branch 936984-new-graphic-for to active.
- Status changed to Needs work
3 months ago 6:23am 15 September 2024 - π¦πΊAustralia darvanen Sydney, Australia
So... what if a theme is dark by default and doesn't actually use the 'dark-mode' mechanism?
- πΊπ¦Ukraine bobi-mel
Do you mean a theme doesn't have the white mode at all?
- πΊπ¦Ukraine bobi-mel
Hi @darvanen
I tried to emulate the cases by using the themes that are dark. I used Seven Dark and Dark Awesome. Unfortunately, these themes don't have a specific class that is added after the switched theme color mode, but have the 'js' class that are present in the HTML tag for authenticated and anonymous users.
Also, I am not sure that the site uses a contrib theme as a site theme. In the custom theme, a developer can add this specific class that can be used as a trigger to switch color mode for arrows.Based on the above I propose the following:
1) rename the new checkbox label from 'Enable Dark mode' to 'Enable collapse arrow color switcher'
2) rename the field for the class that changes the color from "Theme dark mode class' to "Color mode trigger class'
3) Add an additional description for the 'Theme dark mode class'. If your theme is dark to set the white color for the arrow add the class that is present in the Body or HTML tag for authenticated and anonymous users or create it.Let me know what you think about it.
Probably you have any suggestion - π¦πΊAustralia darvanen Sydney, Australia
Thanks @bobi-mel, I like your ideas.
I'm thinking about the wider utility of having two colours to choose from rather the narrower use-case of enabling dark mode here. How about a small tweak to your suggestion:
- One field for "Default arrow color" which is "Black" on installation, with "white" as the other option.
- One field for "Color switching class" with a description that indicates this can be used with themes that apply a class to the element to change the colour of the theme, including implementations of dark mode.
My concern is that more modern themes could be using prefers-color-scheme to set darkmode instead of applying a class, so we need to spell out the kind of support we're providing.
With Drupal CMS (starshot) under active development I can see the utility of this module increasing as more Drupal beginners arrive in the community. In the back of my head I'm still considering a more feature-rich version where the user can choose from multiple arrow types and even supply their own in the UI. That said, if we went with the fields I have suggested above I don't see any reason they would block such an upgrade.
Thoughts?
- πΊπ¦Ukraine bobi-mel
Hi @darvanen
Your idea sounds great.
I've investigated the current implementation of arrows. They are added as a background for the field. I think the implementation of your suggestion will require big changes to the current logic and it will be a major update, and I'm not sure if we can apply these changes to sites that already use this module without breaking them.
So I propose to do the following.
1) Implement my suggestions in comment #28;
2) Make a new release of the module;
3) Within a month, check if there are any new suggestions for graphics from the developers;
4) Create an issue for the new version 5 of the module;
5) Create a problem for the graphics with a detailed description of how the graphic design of the module should look like for version 5 (several types of arrows, adding custom colors for arrows, compatibility with prefers-color-scheme);
6) Add this issue as a parent issue;
7) Create other issues that will expand the functionality of the module and follow the latest drupal trends.What do you think of this idea?
- π©π°Denmark ressa Copenhagen
This would be a great feature, so thanks for working on it. I gave your MR a test spin @bobi-mel, and it worked really well. Enabling Dark mode under /admin/config/user-interface/collapsiblock by setting a class also worked well. I look forward to when it's ready :)
I am adding a short Issue Summary, since it is empty. When you agree on the details, the "Remaining tasks" section can be updated.