Skip to content

Commit dc70be2

Browse files
authored
fix(dashboard/ui): new operation progressive rollout (#2094)
1 parent 6b263fc commit dc70be2

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

ui/dashboard/src/pages/feature-flag-details/operations/elements/operation-modals/rollout/manual-schedule.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,17 @@ const ManualSchedule = ({
206206
onChange={date => {
207207
if (date) {
208208
field.onChange(date);
209+
const isValidIntervals = areIntervalsApart(
210+
watchScheduleList.map((item, idx) =>
211+
(idx === index ? date : item.executeAt).getTime()
212+
),
213+
5
214+
);
215+
if (isValidIntervals) {
216+
clearErrors(
217+
'progressiveRollout.manual.schedulesList'
218+
);
219+
}
209220
}
210221
}}
211222
/>

ui/dashboard/src/pages/feature-flag-details/operations/elements/operation-modals/schedule-operation/schedule-list.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ const ScheduleList = ({
5555
control,
5656
keyName: 'scheduleOperationId'
5757
});
58-
const watchScheduleList = [...watch('datetimeClausesList')];
58+
59+
const watchScheduleList = useMemo(
60+
() => watch('datetimeClausesList'),
61+
[watch, scheduleData.length]
62+
);
5963

6064
const stateOptions = useMemo(
6165
() => [

ui/dashboard/src/pages/feature-flag-details/targeting/segment-rule/attribute-key-select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const CustomOption = memo((props: OptionProps<Option>) => {
1515
const isTruncated = useIsTruncated(spanRef, [props.data.label]);
1616

1717
const labelNode = (
18-
<span ref={spanRef} className="truncate block">
18+
<span ref={spanRef} className="truncate block max-w-[350px]">
1919
{label}
2020
</span>
2121
);

0 commit comments

Comments
 (0)