🇺🇸United States @mortona2k

Seattle
Account created on 16 November 2010, over 14 years ago
#

Merge Requests

More

Recent comments

🇺🇸United States mortona2k Seattle

I pushed an updated experiment, using drawer in the page template.

Going back to having page-drawer.html.twig, which needs to be copied over page.html.twig to try this out.

If you put everything in drawer content, the height will be consistent. when sidebar is open/close.
https://play.tailwindcss.com/iXQCFV126E?size=610x428

If there are header, footer, etc outside of drawer, you need to adjust the sidebar height manually (sidebar has not awareness of the height of elements outside of drawer, like header and footer)
https://play.tailwindcss.com/yBd78ekM7s?size=610x428

Sounds like it can work both ways, but could take some effort to get it working.

🇺🇸United States mortona2k Seattle

Removing v5 prefix from daisyui.com, it no longer redirects.

🇺🇸United States mortona2k Seattle

I think we would need to be able to run an extra service alongside drupal.

Getting a POC that works in DDEV would be cool.

🇺🇸United States mortona2k Seattle

Here's a contrib module to show/hide the whole toolbar: https://www.drupal.org/project/admin_toolbar_toggle .

🇺🇸United States mortona2k Seattle

Maybe the Paragraphs Report module has some inspiration.

I think this will be easier, since fences aren't content they aren't hidden in the database. We should be able to export site config and grep for uses of fences if needed. A UI for this would be nice.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

The base theme compiles because it has no css, but the demo themes are broken until unocss issues are resolved.

🇺🇸United States mortona2k Seattle

Create new branch for tailwind 4.

🇺🇸United States mortona2k Seattle

Having trouble with colors.

Error: [vite] Internal server error: [postcss] Selector is expected

🇺🇸United States mortona2k Seattle

Does this consider themes with SDC? Templates that reference components as THEME:COMPONENT need the theme part updated.

🇺🇸United States mortona2k Seattle

Added CSS for --drupal-displace-offset-top.

🇺🇸United States mortona2k Seattle

I misunderstood how the component worked, no adjustments to the page template are needed. Only the button needs to be in the content slot.

Added a navbar drawer story to demo.

TODO: we need a class for the admin toolbar top margin.

Also need a way to manage additional utility classes, but I guess that should be UI Styles? Or additional props, IE selecting a background color for the drawer.

🇺🇸United States mortona2k Seattle

mortona2k changed the visibility of the branch 3518682-incorect-depencency-nodenode to hidden.

🇺🇸United States mortona2k Seattle

Let's close this, I was just confused about how things worked.

🇺🇸United States mortona2k Seattle

The macro can be replaced with an SDC.

menu.html.twig would include system:menu component, which can include itself and pass item.below as items, just like the macro is doing.

Themers can set up different menu components for main/secondary/sidebar styles.

🇺🇸United States mortona2k Seattle

Added a navigation dropdown story.

🇺🇸United States mortona2k Seattle

How should we handle default styles that are not component props?

IE the dropdown example has: bg-base-100 rounded-box z-1 w-52 p-2 shadow-sm

background color, border style and shadow are styles, z-index, width, and padding are more layout, and z-index is pretty critical to get right within drupal's layouts.

🇺🇸United States mortona2k Seattle

Related ticket for adjusting navbar so dropdowns can be inline.

🇺🇸United States mortona2k Seattle

There are different dropdown methods, which have various quirks. For example, details/summary won't close automatically without additional js.

The issue fork has code for operating with css focus, which seems to handle interactions.

There is also a property to enable hovering.

Menu component has a dropdown option, which is a similar style, but needs js if not using details/summary.
https://daisyui.com/components/menu/#collapsible-submenu-that-works-with...

Configuration form for UI Patterns block:

🇺🇸United States mortona2k Seattle

mortona2k made their first commit to this issue’s fork.

🇺🇸United States mortona2k Seattle

MenuSource is where the links are being loaded by MenuLinkTree->getMenuItems().

That's where I adjusted the parameters being passed in.

This is just like the default system menu block:
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/syste...

I recall finding out that active links are not the same as active menu trail. The active tab/local task is a good example of where .is-active is used. But I think active menu trail classes are generated by the menu tree, and don't need the js for anonymous users.

🇺🇸United States mortona2k Seattle

Linking another core issue.

I think there should be a more robust way to manage the vertical tabs, like on the manage display form. That would resolve a lot of related problems.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

mortona2k made their first commit to this issue’s fork.

🇺🇸United States mortona2k Seattle

This is a duplicate of the related issue.

Looks like the composer.json file was added in that one, but it was never closed.

I posted a fix there to try.

🇺🇸United States mortona2k Seattle

Looks like there's some activity again on a 3.x branch.

The problem with composer install is that the elementor package name is incorrect - it should be elementor/elementor.

To get around this before the fix is committed, add this to your composer.json:

"repositories": [
        {
            "type":"package",
            "package": {
                "name": "elementor/elementor",
                "version": "3.29.0",
                "source": {
                    "url": "https://github.com/elementor/elementor.git",
                    "type": "git",
                    "reference": "main"
                }
            }
        }
    ]
🇺🇸United States mortona2k Seattle

Looks like I had a hand in this a while back: https://www.drupal.org/project/simplify/issues/3207027#comment-14243065 Hide last saved and author (meta) Fixed

Try testing in Stark, there are some differences in other themes. But both should be working.

Here in Claro, advanced and meta vertical tab groups are changed to container elements. Revision information is moved into the meta group.
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/themes/claro/...

It was not totally clear using this module that the fields would get a visually-hidden class. That's something to consider whether there are other implications, like users being able to change things manually.

In the last push, I made some adjustments that seem to work in stark and claro. I don't know why this mix of type = hidden and class = visually-hidden are needed, but using one or the other did not work. I set path to be the same way.

Is it better to use access = false like path had?

🇺🇸United States mortona2k Seattle

I see it working for the Revision field, but not for the Status metadata or Menu settings.

This is in my custom theme, however this is working in Claro, like the screenshots above.

I do see the wrapper being rendered, as @dom. mentioned.

🇺🇸United States mortona2k Seattle

Doing it in SystemMenuBlock makes sense to me, that's where the "Expand all menu links" checkbox is. An additional checkbox for "Don't auto-expand items in the active menu trail"?

🇺🇸United States mortona2k Seattle

They read as duplicates to me, both are talking about confusion over the option and how it affects hardcoded behavior.

I was recently diving into how menus load, and learned about using MenuLinkTree service to load the menu. At first I was trying to stuff extra content into the items with a custom modifier for MenuLinkTree->transform(). But then I discovered that those are more for controlling the structure of the menu, like removing links you don't have access to, or changing the order. But loading additional content is intended to be in a preprocess.

I took notes on things I discovered here: https://www.drupalarchitect.info/articles/rendering-menus

I think the question is where we should make the decision on how menus render. If everything is available, the decision can be made in the template. If the child links are removed further back in the render pipeline, they take deeper development to modify. For example, adding a custom handler to adjust the link loading takes way more effort than deciding not to print level 3 items in a template file.

That said, I think default menu templates should be able to handle whatever links are passed in, and the UI should give us clear control over what is happening per menu display.

🇺🇸United States mortona2k Seattle

Linking to related Menu Block issue.

🇺🇸United States mortona2k Seattle

Some final updates to CORS settings.

🇺🇸United States mortona2k Seattle

Menu Item Extras adds a lot of extra suggestions, including region:

https://git.drupalcode.org/project/menu_item_extras/-/blob/3.1.x/menu_it...

The option in Menu Block to override the theme hook doesn't working with MIE because the hooks are out of order.

I've seen a handful of issues around theme hook ordering, including some in core. Here is one for MIE:

https://www.drupal.org/project/menu_item_extras/issues/3449110 🐛 Rendering wrong template after updating from 2.x to 3.x Active

I'm not sure how/where the order of these suggestions should be reconciled.

🇺🇸United States mortona2k Seattle

Linking to a similar issue in Menu Item Extras.

That one is asking for a contextual link for each menu item, whereas this one is for editing the menu itself.

Ideally there is support for both. But a custom source plugin may be needed to handle MIE that extends one by UIP.

🇺🇸United States mortona2k Seattle

Add to documentation:
The drawer component needs to be called with the drawer_id prop.
A button component with the same drawer_id prop is used to open it.

lg:drawer-open class is used to force it open on large screens.
lg:hidden hides the toggle button.

Still need to handle the margin top for admin toolbar.

🇺🇸United States mortona2k Seattle

Working proof of concept.

I removed the grid for the sidebar that was there, but intend to put it back. However another option is to use the drawer sizing instead.

There's some work to do to get menus, position, and padding working correctly.

To try this, copy the page--drawer template to page.html.twig.

🇺🇸United States mortona2k Seattle

The drawer is forced open on desktop with lg:drawer-open on the drawer wrapper element.

https://daisyui.com/components/drawer/#responsive

🇺🇸United States mortona2k Seattle

While looking at this, I noticed that on firefox if you open the drawer and reload the page, it stays open. This doesn't happen in chrome.

It's because the hidden checkbox stays checked in FF after reload.

Calling this out because I thought mine was broken.

🇺🇸United States mortona2k Seattle

Is the info still relevant? I'm not sure if it's documented anywhere else.

🇺🇸United States mortona2k Seattle

Loaded the menu.active_trail service to use getActiveTrailIds, and then $parameters->setActiveTrail().

🇺🇸United States mortona2k Seattle

mortona2k made their first commit to this issue’s fork.

🇺🇸United States mortona2k Seattle

mortona2k made their first commit to this issue’s fork.

🇺🇸United States mortona2k Seattle

Hey @rodrigoaguilera, I am trying this module out for the first time and running into this issue.

When you enable layout builder for menu items, and then click manage layout, you get a 404.

Here's the URL it was going to:

/admin/structure/menu/display/primary_nav/layout?bundle=menu_link_content

It's happening with the default display and this custom one.

🇺🇸United States mortona2k Seattle

Enabling layout builder, with custom layout per item works without adding other fields (because custom layout is a field).

🇺🇸United States mortona2k Seattle

I made the change in an issue fork, but forgot to create the MR.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

Hello, I took a look at this module today since I saw it got an update.

Looks like this module has a more robust interface vs UI Patterns Library. You can adjust the component values and change the theme.

I have been really liking the UI Patterns modules lately. Compared to another project I'm on with Storybook, it is so much more straightforward to have it all in Drupal.

I'd like to see more collaboration on a Drupal SDC component library (efforts feel fragmented across modules at the moment).

Having a common format for stories is a major step forward, so big +1 from me.

💬 | Edit+ | Roadmap?
🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

I don't think this is related to this module, it happens with the underlying Table view display plugin.

🇺🇸United States mortona2k Seattle

I got the basics working. https://www.retrograde.bike/parts

Category and Part type are the same taxonomy, I used this module to place level 1 and 2 facets. Brand, Groupset, and Groupset series are different taxonomies that have references that create a hierarchy.

They all work the same. With ajax enabled, all filters update with the available facets.

The only thing I am wondering about at this point is the dependee configuration and whether anything is missing from the old api.

🇺🇸United States mortona2k Seattle

I looked into doing this for hierarchical taxonomies with Facets Taxonomy Multilevel: https://www.drupal.org/project/facets_taxonomy_multilevel/issues/3511228 💬 Working with facets 3? Active

Someone else mentioned customizing the links widget plugin on slack: https://drupal.slack.com/archives/C3E9QDZ5M/p1741194501345919

🇺🇸United States mortona2k Seattle

There is already an issue for D11 compatibility, the patch added here is a duplicate.

The next step is for someone to verify that it is working, and if so, set the original issue to "Reviewed and tested by the community".

🇺🇸United States mortona2k Seattle

I have a hierarchical taxonomy working with 3.x and better exposed filters, using default display (select).

It is repopulating the select options with the second level terms. I was expecting a second select list to appear instead, which would be more obvious to the user.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

I rebased the branch onto dev.

The report is working for me and I find it useful as is.

As an additional feature request, I'd like to see a % of content per bundle that has the field value. That can be a little more meaningful than the counts alone.

🇺🇸United States mortona2k Seattle

This is a good idea for a feature.

For some helpful info on image styles that are in use: https://www.drupal.org/project/image_styles_mapping

🇺🇸United States mortona2k Seattle

This is working. Would be nice to add a filter for content type as well.

I would also like to see the field name, for more info on how paragraphs are in use.

These could be separate requests.

🇺🇸United States mortona2k Seattle

Ok that worked.

🇺🇸United States mortona2k Seattle

The conflict line is still there in composer.json, but looks like you're still working on this.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

Applied patch in issue branch and fixed a few things.

Moved ExifOrientationCommands to src/Drush/Commands, which got the command to register for drush 12.

Added AccessCheck fixes.

Changed processBatchStep to static call. I don't know if this was necessary, but it fixed a warning.

I'm still getting an error:

TypeError: Drupal\Core\Entity\EntityStorageBase::getEntityClass(): Return value must be of type string, null returned in Drupal\Core\Entity\EntityStorageBase->getEntityClass() (line 115 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php).

🇺🇸United States mortona2k Seattle

This worked for me. Anything else needed?

🇺🇸United States mortona2k Seattle

Patch #67 is working on 10.4.

🇺🇸United States mortona2k Seattle

MR 17 working for me.

Without the patch, enabling the Views list view triggered this error - the status field was breaking the view.

The code looks clean to me as well.

Thanks for your work on this!

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

Production build 0.71.5 2024