Skip to content

RiverLea 1.3.7: code block, api3 select2 legibility & version numbering - #32176

Merged
eileenmcnaughton merged 1 commit into
civicrm:6.0from
vingle:6.0
Feb 24, 2025
Merged

RiverLea 1.3.7: code block, api3 select2 legibility & version numbering#32176
eileenmcnaughton merged 1 commit into
civicrm:6.0from
vingle:6.0

Conversation

@vingle

@vingle vingle commented Feb 20, 2025

Copy link
Copy Markdown
Contributor

Overview

Fixes two issues, and updates the version number in the metadata on all of the streams:

Before

API3 select list description

image

After

API3 select list description

image
image

Comments

There's no visual change from reverting <code> tags to display inline as they should, rather than as blocks, this is more a consequence in extensions.

@civibot

civibot Bot commented Feb 20, 2025

Copy link
Copy Markdown

🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷

Introduction for new contributors...
  • If this is your first PR, an admin will greenlight automated testing with the command ok to test or add to whitelist.
  • A series of tests will automatically run. You can see the results at the bottom of this page (if there are any problems, it will include a link to see what went wrong).
  • A demo site will be built where anyone can try out a version of CiviCRM that includes your changes.
  • If this process needs to be repeated, an admin will issue the command test this please to rerun tests and build a new demo site.
  • Before this PR can be merged, it needs to be reviewed. Please keep in mind that reviewers are volunteers, and their response time can vary from a few hours to a few weeks depending on their availability and their knowledge of this particular part of CiviCRM.
  • A great way to speed up this process is to "trade reviews" with someone - find an open PR that you feel able to review, and leave a comment like "I'm reviewing this now, could you please review mine?" (include a link to yours). You don't have to wait for a response to get started (and you don't have to stop at one!) the more you review, the faster this process goes for everyone 😄
  • To ensure that you are credited properly in the final release notes, please add yourself to contributor-key.yml
  • For more information about contributing, see CONTRIBUTING.md.
Quick links for reviewers...

➡️ Online demo of this PR 🔗

@civibot civibot Bot added the 6.0 label Feb 20, 2025
@eileenmcnaughton
eileenmcnaughton merged commit 8105271 into civicrm:6.0 Feb 24, 2025
.crm-container code,
.crm-container kbd,
.crm-container code {
display: inline;

@artfulrobot artfulrobot Feb 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we even need this line? It's the default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe. Is there any harm in respecifying to handle places where it's reset to inline?

TBH I think we need to do a ThemeTest section just on code as I didn't realise how many different ways Civi does it. E.g. PrettyPrint (some of which is tackled in 3 & 5 in this PR - #32209).

border: 1px solid var(--crm-c-background4);
color: var(--crm-c-text);
border-radius: 2px;
padding: 2px;

@artfulrobot artfulrobot Feb 26, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's pointless setting vertical padding on an inline element. (Vertical padding would apply if we used inline-block).

I'd recommend padding: 0 2px or padding-left: 2px; padding-right: 2px; to be more explicit.

border-radius: var(--crm-roundness);
}
.crm-container pre code {
display: block;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why this?

Surely the <pre> should have the styling (background, border, padding) and the <code> inside should just not have the bg/brd/padding styling.

I can't think of a case where we have <pre> without an inner <code> and we'd expect it not to be formatted with bg/border etc.?

@vingle vingle Feb 26, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without this it would default to 'inline'. And we want to reset the formatting that's applied in line 338 otherwise you get 2 x borders, padding, etc, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ie this change is doing exactly what you say it should - it's not like this is pre:has(> code)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes we need to reset the bg/border/padding but it's fine to be 'inline' e.g.

https://codepen.io/artfulrobot/pen/EaxgqNd

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The context where I had to re-add this was in CiviCRM - it looked nothing as clean as your code pen!

But agree some commenting would help here.

}
.crm-container p code {
display: inline-block;
.crm-container td > code {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe you that this is necessary, knowing our markup, but a comment as to why would be helpful.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

apologies for my memory. But my comment was more meant for me/you/other devs in future, who might think: Why is Civi insisting that a code descendant of a table cell should be a block? I mean probably we should PR SearchKit to remove this hack. Or it should go in fixes.css? IDK.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeh fixes.css could definitely be better enforced. It's always that choice tho - separate things that belong together into separate files to be faithful to fixes' function.

@artfulrobot

Copy link
Copy Markdown
Contributor

Oh, I just saw that it's been merged already. Dang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants