Skip to content

Fix misalignment in horizontal Schedule when "Custom" is selected#74749

Merged
olehk-mb merged 1 commit into
masterfrom
gdgt-2369-scheduler-component-can-get-misaligned-with-custom-setting
May 27, 2026
Merged

Fix misalignment in horizontal Schedule when "Custom" is selected#74749
olehk-mb merged 1 commit into
masterfrom
gdgt-2369-scheduler-component-can-get-misaligned-with-custom-setting

Conversation

@olehk-mb

@olehk-mb olehk-mb commented May 26, 2026

Copy link
Copy Markdown
Contributor
closes #73343

Closes GDGT-2369, UXW-2923: Cron helper text alignment in schedule UI, #73343

Description

This PR fixes alignment of the horizontal Schedule when a custom schedule is selected. The row now anchors to the top with align-items: flex-start instead of being vertically centered, and the cron input's "quartz cron syntax" hint moved from above to below the input — together these make the cron input line up with sibling controls in the flex container instead of drifting down.

Having the cron hint below the input I think better reflects its purpose — i.e. helping users who are confused by the input. I think most users have heard of cron and recognize it on sight from the example expression we put in the input field, so the explanation only "gets in the way". It's also easier to build visual hierarchy in the horizontal Schedule if the hint is placed below — otherwise we'd need grid/subgrids to align everything, and still introduce layout shifts when the user switches from e.g. hourly to custom cron.

How to verify

  1. Go to a Job in Data Studio (/data-studio/transforms/jobs/<id>) and set the schedule to Custom. The Select and the cron input should be vertically aligned at the top — see the screenshot in the linked issue for the before state.
  2. Anywhere else CronExpressionInput appears (Admin → Settings → Caching → Model persistence → Custom; admin performance caching strategy; question alert custom schedule), the "quartz cron syntax" hint should now sit below the input rather than above.

Demo

Before

CleanShot 2026-05-26 at 11 11 10 CleanShot 2026-05-26 at 11 11 24

After

CleanShot 2026-05-26 at 11 07 49 CleanShot 2026-05-26 at 11 08 07

Checklist

  • Tests have been added/updated to cover changes in this PR

Anchor the horizontal Schedule row to the top with align-items: flex-start
instead of center, and move the CronExpressionInput's "quartz cron syntax"
hint from above to below the input so the cron input aligns with sibling
controls in the flex container.
@olehk-mb olehk-mb added the no-backport Do not backport this PR to any branch label May 26, 2026
@metabase-bot metabase-bot Bot added the .Team/Gadget Gadget team label May 26, 2026
/>
)}

<CustomScheduleInputHint />

@olehk-mb olehk-mb May 26, 2026

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.

Hint is now below explain message. I think it makes sense and I slightly prefer it to explain message being below the hint, but I'm open to be persuaded otherwise

);
return (
<Text>{jt`Our ${cronSyntaxDocsLink} is a string of 5 fields, starting from minutes, separated by spaces`}</Text>
<Text>{jt`Our ${cronSyntaxDocsLink} is a string of 5 fields, starting from minutes, separated by spaces.`}</Text>

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.

This is complete sentence and we seem to use period at the end of such explanations/hints more often than not

@olehk-mb olehk-mb marked this pull request as ready for review May 26, 2026 10:06
@olehk-mb olehk-mb requested a review from a team May 26, 2026 10:07
@chodorowicz chodorowicz self-requested a review May 27, 2026 07:13

@chodorowicz chodorowicz left a comment

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.

Nice! I like the approach with the slight layout change that makes things simpler and IMHO also make the UI cleaner.

@olehk-mb olehk-mb merged commit 656c4e9 into master May 27, 2026
378 of 385 checks passed
@olehk-mb olehk-mb deleted the gdgt-2369-scheduler-component-can-get-misaligned-with-custom-setting branch May 27, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-backport Do not backport this PR to any branch .Team/Gadget Gadget team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scheduler component can get misaligned with "custom" setting

2 participants