Create a new component: Toggletip

Created on 10 February 2021, over 3 years ago
Updated 17 September 2024, about 2 months ago

Anyone wanting to give this a spin can enable the toggletip_test module and go to /toggletip-test/toggletips. It's a test module, so $settings['extension_discovery_scan_tests'] = TRUE; must be configured.

Problem/Motivation

Often, the administration interface gets really busy because there’s a lot of information that needs to be available for the user. Especially in long forms, the descriptions and extra information of fields and other elements add a lot of visual complexity.

Proposed resolution

Create two components

One is a button that calls up a tooltip
The second is an independent tooltip component. Which can be reused in other components (navigation module, contextual links)

Make it ad

Remaining tasks

  • Track down UI examples where this could be implemented.
  • Render array property that can be added to any existing element. It should also be possible to implement it with just markup, using the data-drupal-toggletip attribute.
  • Click / touch

User interface changes

Initial design explorations: https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Drupal-Design-system...

API changes

Data model changes

Release notes snippet

Feature request
Status

RTBC

Version

11.0 🔥

Component
Markup 

Last updated 7 days ago

No maintainer
Created by

🇪🇸Spain ckrina Barcelona

Live updates comments and jobs are added and updated live.
  • Field UX

    Usability improvements related to the Field UI

  • Needs subsystem maintainer review

    It is used to alert the maintainer(s) of a particular core subsystem that an issue significantly impacts their subsystem, and their signoff is needed (see the governance policy draft for more information). Also, if you use this tag, make sure the issue component is set to the correct subsystem. If an issue significantly impacts more than one subsystem, use needs framework manager review instead.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    29,284 pass, 1 fail
  • @bnjmnm opened merge request.
  • 🇫🇮Finland lauriii Finland
    1. Should non-js users be able to access these tips? I don't think they are essential so maybe it's fine, but we need to be aware that non-js users might not be able to access these.
    2. I think we should move the attribute conversion outside from \Drupal\Core\Render\Renderer::doRender because it feels that \Drupal\Core\Render\Renderer::doRender is too low level code for it to support this. Could this be moved to template_preprocess?
    3. The toggle isn't vertically aligned to middle on headings
      😅
    4. The positioning should probably take displace into account:
  • 🇺🇸United States bnjmnm Ann Arbor, MI
    1. Should non-js users be able to access these tips? I don't think they are essential so maybe it's fine, but we need to be aware that non-js users might not be able to access these.

      I'm thinking no. Perhaps the eventual documentation for this can include a mention that system-critical information should not be provided in the toggletip (it really shouldn't anyway)

    2. I think we should move the attribute conversion outside from \Drupal\Core\Render\Renderer::doRender because it feels that \Drupal\Core\Render\Renderer::doRender is too low level code for it to support this. Could this be moved to template_preprocess?

      I moved it. This also required a modification to the html_tag render element since it doesn't uses a template, but it does seem like a more appropriate place than the low level Render.php

    3. The toggle isn't vertically aligned to middle on headings

      This was pretty tricky, especially making sure it works when the text wraps, but I think it's in good shape.

    4. The positioning should probably take displace into account:

      Top displace was supported already, and I added side support. That was tricky! I also added positioning options for the toggle button

    I'm sure there's more to do, but pushing what I have so far so folks can have a look.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Anyone wanting to give this a spin can enable the toggletip_test module and go to /toggletip-test/toggletips. It's a test module, so $settings['extension_discovery_scan_tests'] = TRUE; must be configured.

  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • Status changed to Needs review over 1 year ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    I'm switching this to "Needs Review" to make it easier to find, but it's probably more accurate to say this needs architectural review as there aren't tests etc. The functionality works and should be evaluated to what parts we keep and what should be changed. Instructions how to see tooltips locally at the beginning of the issue summary, and a video of them in action can be found here: https://youtu.be/8l6cEVwgGXw

    At this moment

    • **YES** Reviewing the approach, design, implementation details, etc
    • **NO** Reviewing as if this is a candidate for RTBC. This is a work in progress and we're not there yet. We don't need screenshots, code optimizations, typo correction, etc until there's more agreement on how we move forward
  • Status changed to Needs work over 1 year ago
  • 🇪🇸Spain ckrina Barcelona
    1. Links in Tooltip: should be yellow as in #3248239: Links in the tour tip body are visually the same as the rest of the text - Claro theme to have enough contrast. Until we get the yellow palette, the color to use here is --color-sunglow (#ffd23f).
    2. Not adding a max-length results on really long lines of text. The legibility of this text is really bad, so I would suggest adding a max-with setting by default. Since this is using a 14px font-size, and the maximum legible line-length is around 80 characters, I would suggest a length of 35rem/560px.


      Also, to compensate long first lines, I would suggest using text-wrap: balance;.

  • 🇪🇸Spain ckrina Barcelona

    As discussed in Slack, I would recommend to use an icon instead of using the "i" character. The problem on a UI/design perspective is that it isn’t really recognizable, we shouldn’t rely on the font from the system for understandable icons. so here's an SVG free of any copyright or license.

  • Status changed to Needs review over 1 year ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Both items in #16 are addressed and most items in the MR. I'd prefer to wait on the theme functions until things are further along so iterating is easier as we discover new things.

    Also tagging with needs tests. There's a test module already built with many toggletip use cases that tests can use.

    Setting back to needs review, fully aware that at the very least theme functions and tests must be added, but making this available again for architectural review to see if any interesting feedback comes in before a day is spent on tests.

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Been back n forth to this ticket. One tooltip I think would be the format tags on a text editor. People love to complain about that list of tags at the bottom, this would just make it better but still be there.

    Maybe should be tagged for accessibility as well.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Should we be looking to leverage the popover API here with this polyfill for browsers yet to support it? https://github.com/oddbird/popover-polyfill

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    @larowlan re #21 I think this is a good route. Seems like this will be standard pretty soon. It looks like the popover API already works in most supported browsers and the Firefox support is far enough along that it can be enabled via the dev console. The one thing we'd need to check for is that the Polyfill works for Opera, as the repo does not specify it, and that appears to be the furthest one out from introducing the feature.

    It's tempting to also use the CSS Anchor Positioning polyfill which seems like a nice way to handle positioning, but it seems a little too early to be sure the spec will be widely adopted in its current form. Figured I'd mention it on the off chance that this issue takes long enough to get in that there's better browser support for this (believe it or not some Drupal issues take a while 😛) Floating UI is a pretty solid library in the meantime.

  • 🇨🇦Canada mgifford Ottawa, Ontario

    I'm just putting forward this example from the USWDS. It's better than most I've tested:
    https://designsystem.digital.gov/components/tooltip/

    That said, I'm looking for an explicit example like I've called for here:
    https://github.com/uswds/uswds/issues/5343

    I don't know how often buttons stand in isolation with tooltips.

  • last update over 1 year ago
    Custom Commands Failed
  • @bnjmnm opened merge request.
  • last update over 1 year ago
    Custom Commands Failed
  • First commit to issue fork.
  • last update over 1 year ago
    29,568 pass, 1 fail
  • last update over 1 year ago
    Custom Commands Failed
  • 🇺🇸United States hooroomoo

    JS tests have been added. Looks like there's something wrong with the right, right-start, right-end toggle tips so the test is expected to fail on those assertions right now

  • last update over 1 year ago
    29,573 pass, 1 fail
  • last update over 1 year ago
    29,799 pass, 1 fail
  • last update over 1 year ago
    29,799 pass, 1 fail
  • last update over 1 year ago
    Custom Commands Failed
  • last update over 1 year ago
    Build Successful
  • last update over 1 year ago
    29,799 pass, 1 fail
  • 🇺🇸United States tim.plunkett Philadelphia

    tim.plunkett made their first commit to this issue’s fork.

  • last update over 1 year ago
    29,823 pass
  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States smustgrave

    Did a small test with the test module. This one tooltip seemed off.

  • last update over 1 year ago
    29,828 pass, 1 fail
  • last update over 1 year ago
    29,828 pass, 1 fail
  • Status changed to Needs review over 1 year ago
  • last update over 1 year ago
    29,835 pass
  • 🇺🇸United States smustgrave

    Think the failure was random so restarted the tests to be sure.

    But would this be merged as is and follow ups made?

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Failure did appear to be random.

  • last update over 1 year ago
    29,829 pass, 1 fail
  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • 🇨🇭Switzerland berdir Switzerland

    I'm confused whether this is now a tooltip or a toggletip, everyone seems to be talking about tooltip including the issue title but the code is toggletip?

    Also, doesn't this require documentation and a change record on how to use this?

  • last update over 1 year ago
    29,836 pass, 1 fail
  • Status changed to Needs work over 1 year ago
  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    I think we need to guard against XSS here, left some comments on the MR

  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • First commit to issue fork.
  • last update over 1 year ago
    29,912 pass, 1 fail
  • last update over 1 year ago
    Custom Commands Failed
  • last update over 1 year ago
    29,914 pass, 1 fail
  • last update over 1 year ago
    29,966 pass
  • Status changed to Needs review over 1 year ago
  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States smustgrave

    Appears threads have been addressed so moving back to RTBC.

  • last update about 1 year ago
    29,973 pass
  • last update about 1 year ago
    29,971 pass, 1 fail
  • last update about 1 year ago
    29,971 pass, 1 fail
  • last update about 1 year ago
    29,978 pass
  • last update about 1 year ago
    29,972 pass, 1 fail
  • Status changed to Needs work about 1 year ago
  • 🇫🇮Finland lauriii Finland

    Posted comments on the MR

  • last update about 1 year ago
    Custom Commands Failed
  • last update about 1 year ago
    30,076 pass
  • last update about 1 year ago
    Custom Commands Failed
  • last update about 1 year ago
    Custom Commands Failed
  • last update about 1 year ago
    30,051 pass, 3 fail
  • last update about 1 year ago
    30,070 pass, 1 fail
  • last update about 1 year ago
    30,068 pass, 2 fail
  • last update about 1 year ago
    30,071 pass, 1 fail
  • last update about 1 year ago
    CI aborted
  • last update about 1 year ago
    30,078 pass
  • last update about 1 year ago
    30,071 pass, 1 fail
  • 🇺🇸United States hooroomoo

    Looks like all the feedback has been addressed now. Waiting for 🐛 TestSiteApplicationTest::testInstallWithNonExistingFile() fails when another test creates database tables during the test run Fixed to go in that address the last test fail.

  • last update about 1 year ago
    30,083 pass
  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States hooroomoo

    Tests passed hooray

  • last update about 1 year ago
    30,150 pass
  • last update about 1 year ago
    30,155 pass
  • 🇫🇮Finland lauriii Finland

    I think the CR could still use some more information about what has been added, and how to use it.

    Tagging for JavaScript subsystem maintainer review since this is adding a new JavaScript API.

  • last update about 1 year ago
    30,156 pass
  • last update about 1 year ago
    30,156 pass
  • last update about 1 year ago
    30,156 pass
  • 🇺🇸United States hooroomoo

    Updated the CR.

  • last update about 1 year ago
    30,166 pass
  • 26:37
    22:12
    Running
  • last update about 1 year ago
    30,170 pass
  • last update about 1 year ago
    30,181 pass
  • last update about 1 year ago
    30,181 pass
  • 11:36
    10:22
    Running
  • last update about 1 year ago
    30,188 pass
  • last update about 1 year ago
    30,225 pass
  • last update about 1 year ago
    30,383 pass
  • last update about 1 year ago
    30,383 pass
  • Status changed to Needs work about 1 year ago
  • 🇪🇸Spain ckrina Barcelona

    Nice to see this getting so close to the final line, but I'd love to see a few more changes on the CSS on the line of 🌱 [PLAN] Drupal CSS Modernization Initiative Active to start using modern CSS in core.
    Some thing I would restructure on that sense would be:

    • Use units strategically, switching to use rem instead of px whenever possible. Since core/misc/toggletip.css is not using PostCSS here so we want to ensure the final CSS keeps the right unit we need to define it directly.
    • Define per component CSS Custom Properties (aka CSS variables). Things like colors could be defined at the beginning of the document for this component, which would let other themes override it easily.
  • 🇫🇷France nod_ Lille

    Few comments on the MR

  • last update about 1 year ago
    30,397 pass
  • last update about 1 year ago
    30,399 pass, 2 fail
  • Pipeline finished with Success
    about 1 year ago
    Total: 777s
    #29938
  • 🇷🇸Serbia finnsky

    I see some places where we can improve it. Gonna work on it.

  • last update about 1 year ago
    30,430 pass
  • Pipeline finished with Failed
    about 1 year ago
    Total: 641s
    #31648
  • last update about 1 year ago
    Custom Commands Failed
  • @finnsky opened merge request.
  • last update about 1 year ago
    Custom Commands Failed
  • Pipeline finished with Canceled
    about 1 year ago
    Total: 6s
    #32014
  • Status changed to Needs review about 1 year ago
  • 🇷🇸Serbia finnsky

    Hello!
    Great initiative!

    For my part, I want to note that I see two components here...

    The first is a button with the letter "I" which is added to Drupal elements in different positions and which depends on another component

    The second component is a completely independent Tooltip. To call it, the minimum requirement is a couple of attributes:

    data-drupal-tooltip-toggle-button="Tooltip Text"
    popovertarget="very_unical_id"

    Which can be used by developers for example of the Navigation module:
    https://www.drupal.org/project/navigation/issues/3393067 Added tooltip component. Needs review

    As additional attributes I added:
    - [data-drupal-tooltip-placement] from https://floating-ui.com/docs/computePosition#placement-1
    - [data-drupal-tooltip-on-hover]

    We also need to add:
    - [data-drupal-tooltip-hide-arrow]
    - [data-drupal-tooltip-extra-css-class]

    I think this will make the component more flexible and allow for simple evolution when we want to use for example:
    https://developer.chrome.com/blog/tether-elements-to-each-other-with-css...

    I added some examples in core/modules/system/tests/modules/toggletip_test/src/Form/ToggletipForm.php

    Everything is working:
    https://gyazo.com/eff3ddefa40ae15908de552819c75d7d

    Please take a look!

  • Pipeline finished with Failed
    about 1 year ago
    Total: 229s
    #32015
  • last update about 1 year ago
    Custom Commands Failed
  • Pipeline finished with Failed
    about 1 year ago
    Total: 190s
    #32029
  • First commit to issue fork.
  • Pipeline finished with Canceled
    about 1 year ago
    Total: 34s
    #43095
  • Pipeline finished with Failed
    about 1 year ago
    Total: 160s
    #43096
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    I like the idea for an additional tooltip component alongside the toggletip being built here, but it shouldn't be added within the scope of this issue for two significant reasons:

    • Before work even started on this, we confirmed there is an accessible way to implement toggletips. This isn't the case for tooltips, and in some cases the recommendation to make truly accessible tooltips was to use toggletips instead
    • Even if a fully accessible tooltip approach was discovered, it is best implemented in a separate issue. I's not necessary to introduce them at the same time, and keeping them separate means less of a review burden and avoids the scenario where one render element is fine but the issue can't land because there are concerns about the other one.

    I closed the MR to avoid additional work going into something that, while a good idea, should not be happening in the scope of this issue. The branch still exists, though, and can be used to port the code to a dedicated tooltip issue.

  • 🇷🇸Serbia finnsky

    @bnjmnm
    Hello!

    I can't see problem here if we build it with 2 components still.
    Even if it will be used only as toggle tip only. I can provide MR with same functional but splitted. And without extra features. Then later it will be easier to switch. What you think?

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    I can't see problem here if we build it with 2 components still.

    The problem with providing two components in this issue instead of the one proposed is

    • Scope creep
    • Adding a component that has not been vetted as accessible
  • 🇷🇸Serbia finnsky

    Maybe I explained it wrong.

    But:

    1. Positioning a button and positioning a tooltip are different tasks in Javascript. And they should not be in one monolithic script.

    2. From the point of view of BEM, these styles are also easily separated.

    A11y has absolutely nothing to do with it

    These components are still in one package. So scope not a reason aswell.

  • 🇷🇸Serbia finnsky

    I just pushed tooltip without hover attribute. I still think that placement needed.

    @bnjmnm can you please take a look?

    How it affects a11y and scope?

  • Merge request !5221Toggletip 11x separate components → (Open) created by finnsky
  • Pipeline finished with Failed
    about 1 year ago
    Total: 164s
    #43367
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Did you check this MR?

    Admittedly I didn't get very far as I saw the addition of things labeled "tooltip" when we are decidedly going the toggletip route, not tooltip. For more on that distinction, this article explains it pretty well. Since you're apparently not adding a tooltip per that understanding of it, this can be looked into further - but if this is determined to be a good approach the naming should be something other than "tooltip".

  • 🇷🇸Serbia finnsky

    @bnjmnm Thank you for article link. Sorry but i still see no reason to merge `i` button positioning with tooltip component.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Sorry but i still see no reason to merge `i` button positioning with tooltip component.

    I haven't stated a position on the merging / separation of these components one way or the other so no apology needed. Any reservations expressed thus far are specific to the terminology "tooltip", which should not be used as that is not what is being created here. This is hiding/showing additional information via a dedicated disclosure button, which makes it a toggletip. A tooltip would be something that offers additional info that is triggered by interacting with an element/text on the page that has a purpose outside of being a disclosure for the tip content. Something like tipTrigger and tipContent would be more accurate labels for what I think is being attempted here.

  • 🇷🇸Serbia finnsky

    Yes. Sorry for the misunderstanding.

    This new component may be called
    WhatLooksLikeTooltipButNotTooltip
    or the more neutral "Drupal tooltip"

    But the most important things that are obvious to me:

    1. The component name should not be a blocking issue.

    2. "If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck." so maybe the term tooltip will be more understandable for developers and users.

    3. Positioning the trigger is a separate task for the script and styles.

    That is why I believe that we can safely split this large monolithic script into something simpler, more obvious, component-based and better supported in the future.

  • 🇫🇮Finland lauriii Finland

    The splitting itself makes sense since the toggle tips consists of two parts, the button that user can click and the box that displays the message. I agree with @bnjmnm that tooltip as a name is confusing since it's often used to refer the behavior where user hovers over an element and a box with a message appears. Maybe we could try to rename the component into something that would only describe the box with a message instead of the tooltip behavior? The first idea that comes in my mind is "arrowBox" since it's essentially a box with an arrow. If we ever end up creating a tooltip component, it could reuse the arrow box component. Thoughts? 😊

  • 🇷🇸Serbia finnsky

    Name not critical for me if it will be possible to use it somewhere outside of circle buttons logic and styles

  • 🇷🇸Serbia finnsky

    Good names IMO.

    InfoButton
    Tip

  • Status changed to Needs work 12 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇷🇸Serbia finnsky

    RE: #65

    laurii i think arrowbox not cool. because
    i believe in can be triggered with optional arrow. as i suggested in navigation module usage.
    So now we have T...tip :)

  • Pipeline finished with Canceled
    11 months ago
    Total: 61s
    #67021
  • Pipeline finished with Failed
    11 months ago
    Total: 577s
    #67024
  • 🇷🇸Serbia finnsky

    As suggested i renamed Tooltip to Tip.

    ToggleTip now controls position of `i` button
    Tip is only about positioning and style of T..tip

    Seems logical to me.

  • Pipeline finished with Failed
    11 months ago
    Total: 571s
    #67342
  • Pipeline finished with Failed
    10 months ago
    Total: 231s
    #71739
  • 🇷🇸Serbia finnsky

    Navigation module is in core now. https://www.drupal.org/node/3438895

    It has same tooltip on board. And it works and looks more or less same.
    So here we can move `tTip` outside of Navigation and add extra attribute [data-drupal-tooltip-on-focus] or something to cover both cases.

  • 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10

    Popover API is now part of baseline https://web.dev/blog/popover-api 🙌

  • Pipeline finished with Failed
    5 months ago
    Total: 147s
    #205321
  • Pipeline finished with Canceled
    5 months ago
    Total: 162s
    #205326
  • Pipeline finished with Failed
    5 months ago
    Total: 187s
    #205330
  • Pipeline finished with Failed
    5 months ago
    Total: 192s
    #205341
  • Pipeline finished with Failed
    5 months ago
    Total: 191s
    #205345
  • 🇷🇸Serbia finnsky

    finnsky changed the visibility of the branch toggletip-11x to hidden.

  • 🇷🇸Serbia finnsky

    finnsky changed the visibility of the branch 3197758-create-a-new to hidden.

  • Pipeline finished with Failed
    5 months ago
    Total: 191s
    #205349
  • 🇷🇸Serbia finnsky

    Hidden outdated branches.

  • Pipeline finished with Failed
    5 months ago
    Total: 744s
    #205350
  • Pipeline finished with Canceled
    5 months ago
    Total: 229s
    #205361
  • Pipeline finished with Failed
    5 months ago
    Total: 542s
    #205367
  • Pipeline finished with Success
    5 months ago
    #205375
  • Pipeline finished with Failed
    5 months ago
    Total: 172s
    #205398
  • Pipeline finished with Failed
    5 months ago
    Total: 173s
    #205401
  • Pipeline finished with Success
    5 months ago
    Total: 630s
    #205402
  • 🇷🇸Serbia finnsky

    Some issues with RTL, but it close to finish now.

  • Pipeline finished with Success
    5 months ago
    Total: 691s
    #205470
  • Pipeline finished with Success
    5 months ago
    Total: 540s
    #205712
  • Pipeline finished with Failed
    5 months ago
    Total: 200s
    #205765
  • Status changed to Needs review 5 months ago
  • 🇷🇸Serbia finnsky

    Now seems all works as expected.
    Please review.

  • Pipeline finished with Success
    5 months ago
    Total: 753s
    #205777
  • Pipeline finished with Success
    4 months ago
    Total: 622s
    #214911
  • Pipeline finished with Failed
    4 months ago
    Total: 581s
    #220495
  • Status changed to Needs work 4 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Status changed to Needs review 4 months ago
  • Pipeline finished with Success
    4 months ago
    Total: 548s
    #221703
  • Status changed to Needs work 4 months ago
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Status changed to Needs review 4 months ago
  • Pipeline finished with Success
    4 months ago
    Total: 603s
    #223892
  • Status changed to Needs work 4 months ago
  • Posted some small changes on MR.

  • Status changed to Needs review 4 months ago
  • Also one thing that i noted while manually testing the toggletips on toggletip-test/toggletips form is that when we click on any toggletip there is a momentary flash and then the information is positioned correctly.Can some also test this and confirm that this is happening on their setup?

  • Pipeline finished with Failed
    4 months ago
    Total: 1212s
    #226278
  • 🇷🇸Serbia finnsky

    yeah, i had it aswell. fixed in last commit

  • Pipeline finished with Failed
    4 months ago
    Total: 164s
    #226312
  • Pipeline finished with Failed
    4 months ago
    Total: 463s
    #226317
  • Pipeline finished with Canceled
    4 months ago
    Total: 209s
    #226331
  • Pipeline finished with Success
    4 months ago
    Total: 873s
    #226335
  • 🇷🇸Serbia finnsky

    Removed popover polyfill, it seems not required anymore

  • Pipeline finished with Canceled
    4 months ago
    Total: 223s
    #226870
  • Pipeline finished with Success
    4 months ago
    Total: 461s
    #226876
  • Status changed to Needs work 3 months ago
  • 🇺🇸United States smustgrave

    Think it would be neat to get this into 11.1

    Left some comments around the cspell lines.

  • Pipeline finished with Canceled
    3 months ago
    Total: 342s
    #256582
  • 🇷🇸Serbia finnsky

    After discussion in Slack seems we still need popover polyfill for Firefox ESR

  • Pipeline finished with Canceled
    3 months ago
    Total: 168s
    #256589
  • Status changed to Needs review 3 months ago
  • Pipeline finished with Canceled
    3 months ago
    Total: 510s
    #256590
  • Pipeline finished with Success
    3 months ago
    Total: 515s
    #256597
  • Pipeline finished with Failed
    about 2 months ago
    Total: 176s
    #280831
  • 🇷🇸Serbia finnsky

    Rebased and fixed php linter. Please review

  • Pipeline finished with Success
    about 2 months ago
    Total: 388s
    #280836
  • Status changed to RTBC about 2 months ago


  • How I Verified the Issue:
    Here’s the process I followed to make sure the toggletip issue was fixed:

    Environment Setup: I set up a Drupal 11.x-dev environment and enabled the toggletip_test module.
    Test Page: I visited the test page at /toggletip-test/toggletips to see the toggletip in action.
    Testing Tooltip Functionality: I checked that the tooltips worked properly on different HTML tags like h1, h2, and h3.
    UI Complexity Review: I reviewed the interface to ensure the tooltips reduced visual clutter in areas with long forms and lots of information.
    Reusability Test: I tested the toggletip in different areas like navigation and contextual links to ensure it could be reused without any issues.
    Responsiveness Check: I checked how the tooltips behaved on different devices and screen sizes, making sure they were properly positioned.
    Cross-browser Test: I tried the tooltips on multiple browsers (Chrome, Firefox, Safari) to confirm they worked consistently.

    Outcome:
    The toggletip issue is fully resolved! Here’s why:

    Tooltips Work Smoothly: They show up and disappear as expected when interacting with different HTML elements. No glitches or interruptions.

    Less Visual Clutter: The tooltips effectively reduced clutter in sections with long forms and text, making the interface cleaner and easier to navigate.

    Reusability: The toggletip can now be reused in different places (like navigation and contextual links) without any problems.

    Responsive Design:
    The tooltips fit well on different screen sizes and devices. They don’t cover up any content or break the layout.

    Cross-browser Compatibility: The tooltips work perfectly across all major browsers, like Chrome, Firefox, and Safari.

  • 🇩🇪Germany geek-merlin Freiburg, Germany

    I reviewed the code, backported it for a 10.x project, and played with it, and noticed one bug:
    - The #toggletip code in theme.inc does NOT attach the library. It should.
    - The demo form "manually" attaches the library. It should not.

    All in all: Hot stuff!

  • Pipeline finished with Failed
    about 1 month ago
    Total: 742s
    #296791
  • 🇷🇸Serbia finnsky

    Fixed feedback and add small fix in case of wrong context of textarea.

  • Pipeline finished with Success
    about 1 month ago
    Total: 873s
    #296814
  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇷🇸Serbia finnsky

    Rebased. Please review.

  • Pipeline finished with Failed
    26 days ago
    Total: 220s
    #305819
  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • 🇷🇸Serbia finnsky

    Seems some php linters were changed.
    I have no power here ;)

  • The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Pipeline finished with Success
    26 days ago
    Total: 4391s
    #305879
  • 🇩🇪Germany rkoller Nürnberg, Germany

    I've tested MR5221 in Safari 18.0.1 and latest Edge and Firefox with macOS 14.7 with and without VoiceOver active. And in Safari the Toggletip is not shown/expanded at all.
    In edge and Firefox am able to expand it by pressing space or the return key, by clicking the icon with the mouse, or with VoiceOver active by pressing VO-space, each time the toggle tip is expanded. while in Safari nothing happens when i press, space, return, VO-space or by clicking with the mouse, the toogletip remains collapsed.

    The console in Safari shows the following warning: The atDescription property of toggle button 27qvhmhw12i-toggle is empty, and is using a default value. To be sufficiently accessible, this property should describe the information this button reveals. in toggletip-js:133

    Setting it back to needs work

  • 🇷🇸Serbia finnsky

    finnsky changed the visibility of the branch toggletip-11x-separate-components to hidden.

  • 🇷🇸Serbia finnsky

    finnsky changed the visibility of the branch toggletip-11x-separate-components to active.

  • 🇩🇪Germany rkoller Nürnberg, Germany

    and i've tested the toggle with voiceover in edge. unfortunately keycstr the app i am using to show the keys i've pressed isnt showing any voiceover keycombinations (anything with VO = ctrl and option) . but if i wouldnt have the visual context i would consider the toggle tip experience in the aural inteface challenging. i've recorded a short video (voiceover.mp4)

    • when the first toggle icon gets into focus i press VO-space so the toggle expands
    • i then i've pressed VO-arrow up and the toggletip expands.
    • i then tried VO-arrow left. the focus gets to "a container render array" with the voiceover cursor.
    • i press VO arrow right and the voiceover cursor gets back to the toggle icon. i press VO arrow right again. then i press VO arrow down and then finally i press VO-arrow up.
    • voiceover then announces "there is a group with three items". but the content that is automatically announced now starts with "the story opens", "CONTAINER: a movie" is omitted. (*i am also unsure how to reach that paragraph. i was unable to by stepping through with the voiceover cursor same as if i press VO-a to read through everything the content on the page is getting announced not the content within the toggletip)
    • with the toggle tip still expanded i then pressed the tab button. the focus went to the "mystery" link within the toggletip and then to the next info button which is next in the tabindex outside the toggletip.
    • on the second toggle tip i then did again VO-space. but in contrast to the first toggletip i am unable to get the content of the toggle tip announced. i've tried again in the VO- arrow left, VO arrow right VO arrow down VO arrow up.. for the first three nothing happens but for VO arrow up the voice over cursor gets to the sentence right before the info button and not like for the first toggletip announces the content of the toggletip.
  • 🇷🇸Serbia finnsky

    I found original bug with safari.
    https://github.com/hotwired/turbo/issues/1245

    If i just create node with button and popover it works. But if it is inside any form. it doesn't work in safari

  • 🇩🇪Germany geek-merlin Freiburg, Germany

    Hi @finnsky and all,

    this is a great step forward, and this is why i cherry-picked this early for use in one project. (And i see my initial feedback was helpful, nice!).

    Here is some more feedback:
    - I like the '#help' approach, it makes altering existing elements possible (without additional wrapper).
    - In the current approach, the trigger button is added with javascript, leveraging a library that does the positioning. This gave us some pain in our project.
    - (1) First, js-added stuff is a PITA for theming (it's like select box improvements, where we switched to sumoselect, as it responds to CSS).
    - (2) But the killer was, the javascript totally breaks when the element is not in the viewort initially, like with tabs and other disclosure elements.
    - I doubt that (2) can be healed robustly, and tbh. in face of (1) we don't think putting effort in it is worth it.
    - The result was, that we had to abandon this approach, and roll our own.

    You can find our approach here and pick whatever you like: https://gitlab.com/geeks4change/modules/h4d_help
    I suggest using this approach, because:
    - It builds the markup server-side, so it works without JS (at least soon-ish, when the polyfills are obsoleted)
    - It is stylable via CSS
    - It works with tabs and other disclosure elements
    - Apart from the popover polyfill, it uses anchor positioning for the toggle and help (native in chromium-based browsers, polyfilled in others) in its anchor-position variant. (The anchor-positioning Insert-Area variant is even nicer "soon" but not polyfilled yet.)

    So needs-work for that imho.

  • 🇷🇸Serbia finnsky

    I think it is ok about button positioning with js.
    But we need to clean different position calculations for button.
    And move them to css:has()

  • 🇩🇪Germany geek-merlin Freiburg, Germany
Production build 0.71.5 2024