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

(dev/core#3865) Fix css for price fields of html type Select with lon… #24598

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

yashodha
Copy link
Contributor

…g labels

Overview

Fix css for price fields of html type Select with long labels

I propose based on the string length of the longest option we should provide the display,so it doesn't look wrapped for some options.

Before

Currently, the option labels are long the display looks something like this
priceset_display

this is on dmaster

After

looks much nicer

post

@civibot
Copy link

civibot bot commented Sep 23, 2022

(Standard links)

@civibot civibot bot added the master label Sep 23, 2022
@braders
Copy link
Contributor

braders commented Sep 23, 2022

Has this been tested on mobile? It feels like this could cause issues due to the narrow screen width. Unlike most CiviCRM screens, the event booking pages are likely to frequently be used on mobile devices and so should be fully responsive.

@@ -520,10 +520,20 @@ public static function addQuickFormElement(
else {
$visibility_id = self::getVisibilityOptionID('public');
}

$class = '';
$maxlen = max(array_map('strlen', $selectOption))
Copy link
Contributor

Choose a reason for hiding this comment

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

semicolon missing here

@demeritcowboy
Copy link
Contributor

For mobile, I expect it would depend on the theme. The test site here probably isn't the best one to look at but it works:

Untitled3

However on desktop backend registration looks a little weird, but no weirder than the regular contact edit page which also overflows. But also probably depends on theme.

Untitled4

@yashodha
Copy link
Contributor Author

yashodha commented Oct 7, 2022

@demeritcowboy
This is how it looks before

priceset_display

and after
pro

and will only affect the drop-down with long labels.

@demeritcowboy demeritcowboy merged commit b717653 into civicrm:master Oct 7, 2022
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