-
Notifications
You must be signed in to change notification settings - Fork 23
feat(ui/dashboard): flags discard change #2119
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
base: main
Are you sure you want to change the base?
Conversation
fb1ad41
to
8cf02cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a comprehensive "discard changes" feature for the feature flag details targeting system. It adds functionality to track and revert unsaved changes in different sections of the targeting configuration.
- Adds a discard changes modal with support for multiple change types (prerequisites, individual rules, custom rules, default rules)
- Implements change tracking and comparison utilities for detecting modifications in targeting configurations
- Adds undo buttons throughout the targeting interface to trigger discard operations
Reviewed Changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
ui/dashboard/src/utils/style.ts |
Adds capitalize utility function for string formatting |
ui/dashboard/src/utils/data-type.ts |
Updates isEmpty function to support generic array types |
ui/dashboard/src/pages/feature-flag-details/targeting/utils.ts |
Adds extensive discard changes logic and utility functions |
ui/dashboard/src/pages/feature-flag-details/targeting/types.ts |
Defines types for discard changes functionality |
ui/dashboard/src/pages/feature-flag-details/targeting/segment-rule/rule.tsx |
Adds null safety for feature rules and clauses |
ui/dashboard/src/pages/feature-flag-details/targeting/segment-rule/index.tsx |
Replaces remove button with undo button for discard changes |
ui/dashboard/src/pages/feature-flag-details/targeting/prerequisite-rule/index.tsx |
Adds undo button for prerequisite rule discard changes |
ui/dashboard/src/pages/feature-flag-details/targeting/prerequisite-rule/condition.tsx |
Adds validation and auto-selection for prerequisite variations |
ui/dashboard/src/pages/feature-flag-details/targeting/individual-rule/index.tsx |
Adds undo button for individual rule discard changes |
ui/dashboard/src/pages/feature-flag-details/targeting/index.tsx |
Integrates discard changes functionality into main targeting component |
ui/dashboard/src/pages/feature-flag-details/targeting/default-rule/index.tsx |
Adds undo button for default rule discard changes |
ui/dashboard/src/pages/feature-flag-details/elements/discard-changes-modal/index.tsx |
Implements the discard changes modal component |
ui/dashboard/src/components/date-time-picker/custom-datepicker.css |
Fixes z-index for datepicker triangle |
ui/dashboard/src/@types/feature.ts |
Adds type field to FeatureRuleClause |
ui/dashboard/src/@locales/ja/form.json |
Adds Japanese translations for discard changes |
ui/dashboard/src/@locales/ja/common.json |
Adds Japanese translations for common discard actions |
ui/dashboard/src/@locales/en/form.json |
Adds English translations for discard changes |
ui/dashboard/src/@locales/en/common.json |
Adds English translations for common discard actions |
ui/dashboard/src/@icons/index.tsx |
Exports new warning and arrow icons |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
import { capitalize } from 'lodash'; | ||
import { cn } from 'utils/style'; |
Copilot
AI
Sep 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import uses lodash's capitalize function, but the project has a custom capitalize function in utils/style.ts. The imports should be consistent - either use the custom function or ensure the lodash version is intended.
import { capitalize } from 'lodash'; | |
import { cn } from 'utils/style'; | |
import { capitalize, cn } from 'utils/style'; |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed b461ec6
"custom-rule-audience-not-include-desc": "<p>この配分に含まれていない <b>{{percent}}%</b> には <b>{{variation}}</b> が提供されます</p>", | ||
"custom-rule-audience-include-desc": "<p>この配分に含まれている <b>{{percent}}%</b> には提供されます</p>", | ||
"custom-rule-default-strategy-discard-desc": "デフォルトルールに設定", | ||
"custom-rule-default-audience-discard-desc": "デフォルトオーディエンスに設定します" |
Copilot
AI
Sep 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing trailing comma after the translation value. This should end with a comma to maintain consistent JSON formatting.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed b461ec6
7985caa
to
b461ec6
Compare
No description provided.