-
Notifications
You must be signed in to change notification settings - Fork 31
Feedback-widget #1427
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?
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
FMorrison87
left a comment
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 looks awesome. Very thorough!
| } | ||
|
|
||
| // Topic-specific validation | ||
| if (this.activeTopic === 'issue' || this.activeTopic === 'bug') { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assert the type for files.
| } | ||
|
|
||
| // Add standard topics if included | ||
| if (this.isFormIncluded('issue')) { |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
Brief Description
JIRA Link
Related Issue
General Notes
Motivation and Context
Issues and Limitations
Types of changes
Checklist