Tiny feature request for core: add 3 classes

Hi, I’m working on styling the ‘quote’ box… is it possible for Discourse core to gain classes on the down arrow (see quote in context) and the up arrow (jump to quoted message)?

And-- more importantly-- could there also be a class on the main .quote aside (parent div) to indicate if this user being quoted is blocked?

I’m not asking for any visual changes, I’m not asking for changes to how “ignoring” works :wink: just want some classes so I have some options available to me and other future theme developers.

I’m also happy to give this a crack and submit a PR myself, if someone can just point me in roughly the right direction for where in the codebase I should attempt it.

2 Likes

Are you sure you need to, can’t you target this in other ways? you can even use the title attribute to target it if you must.

2 Likes

I may be able to target those two elements (the arrows) in CSS, yes. It will be some hairy selectors and obviously more brittle than if we just put classes directly on those elements, but I probably get it done.

The harder one is to figure out if that user is ignored or not. As far as I can see, none of the parent containers add a class to indicate ‘ignored’ status for the quote. Without that class I can’t do anything different in CSS. What do you think? Please tell me if I’m wrong :slight_smile:

ignored user was quoted is probably not there this would indeed require a core change.

not sure how I feel about doing work here to add the class, I guess if you put a PR through and it is easy enough I am happy with to merge

4 Likes

I’ll see if I can figure it out :slight_smile:

1 Like

That was surprisingly easy! Took me longer to find where to add the code, than to write the one line. Isn’t it always like that? :wink:

HEY GANG IT’S MY FIRST PULL REQUEST FOR DISCOURSE CORE! :partying_face:

PR in place: https://github.com/discourse/discourse/pull/9511

5 Likes

The up and down arrows are easy

.quote-controls .svg-icon-title
.quote-controls .back

I’m not sure about blocked posts at all, you could be right that your PR is the best way.

2 Likes