Feedback-widget#1427
Conversation
…ds based on selected topic
…back submission flow
…g dedicated methods for topic selection
…nhanced user feedback experience
…dynamic sentiment button interactions
…ith dynamic icon updates
…feedback categorization
… form submission handling
… handling and rendering
…improved modularity
…th dynamic rendering
…r improved modularity
…proved readability
…eedback component
…nd display options
…lidation and error handling
…mproved readability
|
✅ Deploy Preview for astro-stencil ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for astro-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…roved property naming
…d improve type definitions
…and file upload zone
…, shadow parts, and dependencies
…ate styles for improved layout
Frances Morrison (FMorrison87)
left a comment
There was a problem hiding this comment.
This looks awesome. Very thorough!
| } | ||
|
|
||
| // Topic-specific validation | ||
| if (this.activeTopic === 'issue' || this.activeTopic === 'bug') { |
There was a problem hiding this comment.
I would replace these if statements for activeTopic with a switch statement.
|
|
||
| // Check if a form topic should be displayed | ||
| private isFormIncluded(topic: FeedbackTopic): boolean { | ||
| console.log('this.included_forms', topic, this.includedForms) |
There was a problem hiding this comment.
Stray log?
| if (!this.uploadableTopics || this.uploadableTopics.trim() === '') { | ||
| return true // All topics allow uploads if not restricted | ||
| } | ||
| if (this.uploadableTopics.toLowerCase() === 'none') { |
There was a problem hiding this comment.
Refactor into else if?
| // Handle file upload | ||
| private handleFileUpload = (event: Event) => { | ||
| const input = event.target as HTMLInputElement | ||
| const files = input.files |
There was a problem hiding this comment.
Would probably be good to assert what type this is to ensure the Array.from() later on is valid.
| const dropZone = event.currentTarget as HTMLElement | ||
| dropZone?.classList.remove('drag-over') | ||
|
|
||
| const files = event.dataTransfer?.files |
There was a problem hiding this comment.
Assert the type for files.
| } | ||
|
|
||
| // Add standard topics if included | ||
| if (this.isFormIncluded('issue')) { |
There was a problem hiding this comment.
Switch statement for these.
| private renderSentimentButtons() { | ||
| return ( | ||
| <div class="rux-form__sentiment-buttons" part="sentiment-group"> | ||
| {this.renderSentimentButton('positive', '😊')} |
There was a problem hiding this comment.
lol
Brief Description
JIRA Link
Related Issue
General Notes
Motivation and Context
Issues and Limitations
Types of changes
Checklist