Conversation
…assessments-types-slice
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…sment-dashboard-with-progress-tracking
…thyca/fides into ENG-2370-ui-assessment-dashboard-with-progress-tracking
…sment-dashboard-with-progress-tracking
Co-authored-by: Cursor <cursoragent@cursor.com>
…' of github.com:ethyca/fides into ENG-2370-ui-assessment-dashboard-with-progress-tracking
Greptile SummaryThis PR implements a detail page for privacy assessments, allowing users to view and edit individual assessment answers. The implementation adds several new React components ( Key changes:
Style observations:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 7ccf872 |
| return ( | ||
| <> | ||
| <Flex gap="large" align="flex-start" className="min-w-0 flex-1"> | ||
| <div className="flex-1"> |
There was a problem hiding this comment.
use semantic element or Flex component instead of div
| <div className="flex-1"> | |
| <Flex className="flex-1" direction="vertical"> |
Context Used: Rule from dashboard - Avoid using div elements when possible. Use semantic HTML elements or component library alternativ... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
clients/admin-ui/src/features/privacy-assessments/QuestionGroupPanel.tsx
Show resolved
Hide resolved
speaker-ender
left a comment
There was a problem hiding this comment.
Minor nits/questions but otherwise looks good!
| const [isEditing, setIsEditing] = useState(false); | ||
| const [editValue, setEditValue] = useState(value); | ||
|
|
||
| useEffect(() => { | ||
| if (!isEditing) { | ||
| setEditValue(value); | ||
| } | ||
| }, [value, isEditing]); | ||
|
|
||
| const handleSave = async () => { | ||
| await onSave?.(editValue); | ||
| setIsEditing(false); | ||
| }; | ||
|
|
||
| const handleCancel = () => { | ||
| setEditValue(value); | ||
| setIsEditing(false); | ||
| }; | ||
|
|
||
| if (isEditing) { |
There was a problem hiding this comment.
What problem is this boilerplate solving that ant form cannot do?
This seems very similar to just a form that manages a value + has a callback on submission.
There was a problem hiding this comment.
Great catch! I've refactored it to use Ant Form to handle the state and it's much cleaner.
| const [notificationApi, notificationContextHolder] = | ||
| notification.useNotification(); |
There was a problem hiding this comment.
Higher level question that doesn't need to be solved here:
Is the only reason we are adding all of this to the provider in fidesui because it doesn't pick up styles for messages/modals/notifications?
There was a problem hiding this comment.
I think yes, that's how we can get the modals/messages/notification to use our theme without needing to render the {modalContext} manually. I think Jeremy work on this solution.
…idual-answer-view-and-edit-interface
60b1b53 to
44a04e6
Compare
Ticket ENG-2371
Description Of Changes
Implements a detail page for assessment where you can view answers and update them.
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works