Skip to content

feat(ui): promotion windows - #7216

Open
Marvin9 wants to merge 4 commits into
mainfrom
Marvin9/promotion-windows-ui
Open

Marvin9 wants to merge 4 commits into
mainfrom
Marvin9/promotion-windows-ui

Conversation

@Marvin9

@Marvin9 Marvin9 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Marvin9 and others added 3 commits September 14, 2026 11:49
Add a calendar-based editor for the promotion windows carried on
ProjectConfig.spec.promotionWindows and ClusterConfig.spec.promotionWindows.

Windows are stored unparsed, as iCal DTSTART/DTEND plus an RFC 5545 RRULE.
The UI expands them client-side with rrule and renders each occurrence on a
FullCalendar week/month grid, where a drag drafts a new window and a click
edits an existing one. The modal covers effect (Allow/Deny), time zone,
recurrence, enablement, description and the Stage/Project selectors; a set
of recipes seeds the common shapes (business hours, weekend freeze, release
train, carve-out).

The pages hang off the existing settings menus as nested views under Cluster
Config and ProjectConfig, declared inline as children of those entries.

antd's DatePicker and TimePicker are bound to dayjs by default, which would
have meant a second date library alongside date-fns. Generate them over
date-fns instead, so every date in this feature is a plain Date.

Adds @fullcalendar/react, rrule, and rc-picker -- the last only to reach the
date-fns generate config, and pinned to the version antd already resolves.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Mayursinh Sarvaiya <[email protected]>
Add an optional featureFlags object alongside extensions on the extensions
context. The promotion windows subpages read it and are only declared when
promotionWindows is on, so they get neither a menu entry nor a route.

Nothing sets the flag in open source, so the pages stay hidden unless a
distribution passes featureFlags through the extensions provider.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Mayursinh Sarvaiya <[email protected]>
Signed-off-by: Mayursinh Sarvaiya <[email protected]>
@Marvin9
Marvin9 requested a review from a team as a code owner September 15, 2026 07:15
@kargo-governance-bot kargo-governance-bot Bot added the needs/area Issue or PR needs to be labeled to indicate what parts of the code base are affected label Sep 15, 2026
@netlify

netlify Bot commented Sep 15, 2026

Copy link
Copy Markdown

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit eb4d42f
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/6aa91c42c45569000849e99c
😎 Deploy Preview https://deploy-preview-7216.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kargo-governance-bot kargo-governance-bot Bot added needs/kind Issue or PR needs to be labeled to clarify its nature needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed labels Sep 15, 2026
@Marvin9
Marvin9 requested a review from rpelczar September 15, 2026 07:19
@Marvin9 Marvin9 added kind/enhancement An entirely new feature area/ui Affects the UI priority/normal This is the priority for most work and removed needs/kind Issue or PR needs to be labeled to clarify its nature needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed needs/area Issue or PR needs to be labeled to indicate what parts of the code base are affected labels Sep 15, 2026
@Marvin9 Marvin9 added this to the v1.12.0 milestone Sep 15, 2026
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 35.29%. Comparing base (0e844bb) to head (eb4d42f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7216   +/-   ##
=======================================
  Coverage   35.29%   35.29%           
=======================================
  Files         859      859           
  Lines       70737    70737           
=======================================
  Hits        24964    24964           
  Misses      45773    45773           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Mayursinh Sarvaiya <[email protected]>

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 don't think it's a good idea to call it featureFlags in that case.

Can we just check if there is any extension and then show this view?

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.

Can we call it promotion-window-form-utils?

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 think the modal is too wide. Can we make this a bit narrower?

Comment on lines +96 to +99
<Button
icon={<FontAwesomeIcon icon={faTrash} size='sm' />}
onClick={() => labels.remove(index)}
/>

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.

Image

fix alignment

Comment on lines +175 to +190
<Flex gap={8} justify='end'>
<Button
icon={<FontAwesomeIcon icon={faPencil} size='sm' />}
onClick={() => onEdit(promotionWindow)}
size='small'
color='default'
variant='filled'
/>
<Button
icon={<FontAwesomeIcon icon={faTrash} size='sm' />}
onClick={() => onDelete(promotionWindow)}
size='small'
color='danger'
variant='filled'
/>
</Flex>

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.

Please make this consistent and add labels

className='min-h-full'
extra={
<Button
type='primary'

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.

use default to make this consistent

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

Labels

area/ui Affects the UI kind/enhancement An entirely new feature priority/normal This is the priority for most work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants