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

Add the Type Tray module #77

Merged
merged 2 commits into from
May 21, 2024
Merged

Conversation

e0ipso
Copy link
Contributor

@e0ipso e0ipso commented May 15, 2024

We have been successfully using Type Tray in all of our projects.

The reasoning behind using it is documented here.

image

We have been successfully using Type Tray in all of our projects.
Copy link
Owner

@phenaproxima phenaproxima left a comment

Choose a reason for hiding this comment

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

One concern, otherwise I'm happy with it.

type_tray:
type_category: _none
type_thumbnail: ''
type_icon: /sites/default/files/type-tray-icons/icon-blog-post.svg
Copy link
Owner

Choose a reason for hiding this comment

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

🤔 My only concern here is that, if and when we add the ability to install the site in a directory other than sites/default, this will break.

So we either need test coverage that the icons actually appear, or we need to find a way to make this a little more dynamic. A custom config action, maybe? IMHO, the correct resolution here is for Type Tray to support more dynamism in this setting, if there's not already an issue for that. (If we were able to just use the public:// stream wrapper, this problem would go away. Maybe we already can do that...?)

That said, I'm okay deferring this to a follow-up PR. (Can you open an issue for it here?)

@phenaproxima phenaproxima changed the title feat: add Type Tray Add the Type Tray module May 15, 2024
@phenaproxima
Copy link
Owner

Oh, one other request, @e0ipso -- in another PR, can you opt the Basic block type into this as well? It will necessitate creating a new starshot_basic_block_type recipe that either builds on top of, or outright forks, core's basic_block_type.

@pameeela
Copy link
Collaborator

I was initially on the fence about this, but I tried it out and it is an improvement. I wasn't sure about needing an icon for each content type, but I see there is a default icon that is perfectly fine. I would also just say the basic page icon proposed here doesn't really make sense to me, but it's not super important.

I also think the styling could use some love but that's what's great about Starshot, it should drive improvement in contrib as well :)

@phenaproxima
Copy link
Owner

the basic page icon proposed here doesn't really make sense to me

I agree on this. But that's very easily fixed later.

I think my only remaining concern here is the possibility of this breaking if the site directory is not sites/default. If we address that, ship it!

@pameeela
Copy link
Collaborator

public:// doesn't seem to work, based on testing. @phenaproxima you initially said the file location could be a follow up, do you still think so? Your last comment seems to imply we should solve it first.

@phenaproxima
Copy link
Owner

I think it can be a follow-up as long as we have an issue open -- ideally in Type Tray's issue queue, with a follow-up issue here to use the fix when there's a patch. @e0ipso, if you open those things, we can merge this.

@phenaproxima
Copy link
Owner

Opened an issue for this, with a patch (no tests yet): https://www.drupal.org/project/type_tray/issues/3447694

Can we apply that patch here, and switch to using stream wrappers?

@e0ipso
Copy link
Contributor Author

e0ipso commented May 21, 2024

Sorry for taking this long to reply. I will be looking into this today.

@e0ipso
Copy link
Contributor Author

e0ipso commented May 21, 2024

@phenaproxima @pameeela this was fixed. Let me know if there is anything else.

@phenaproxima phenaproxima merged commit 926cf29 into phenaproxima:main May 21, 2024
3 checks passed
@phenaproxima
Copy link
Owner

Thanks @e0ipso et. al., this looks great.

@pameeela
Copy link
Collaborator

I'm wondering about adding this now in light of a few other ongoing discussions about how to vet modules. This one is (pretty much) purely a visual change, not really functional. It does offer categorisation to content types, but that is unlikely to be useful for the Starshot audience I think, because it would only be needed if there are a lot of content types.

I still really like the module but now I'm second guessing the addition!

@phenaproxima
Copy link
Owner

It's true that Type Tray's changes are visual, but IMHO they are visual in a way that increases Drupal's user-friendliness and usability, particularly by supporting type-specific icons. That's why I added it.

I think it's completely fine and in line with Starshot's mission to add "cosmetic" modules if they enhance usability. That's why I'm on the fence about Gin Login, which absolutely is a visual upgrade, but not necessarily a usability upgrade.

@gitressa
Copy link

Which modules to add, and which not to add ... it's a fine balance. There are nice-to-have modules, and then there are modules which add a lot of value. Every "nice" module included risk adding technical debt, and -- by definition -- will increase the number of modules, at the risk of ballooning into a sea of modules, if not kept in check. Keeping the number of modules at a reasonable level is good practice, in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants