-
-
Notifications
You must be signed in to change notification settings - Fork 10
💥 Remove stwui (#2205) #2206
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
💥 Remove stwui (#2205) #2206
Conversation
WalkthroughThe changes remove all usage and references to the "stwui" library from the project. This includes uninstalling the dependency, updating Tailwind CSS configuration, and replacing the clipboard utility in a component with a custom implementation. No changes were made to exported or public APIs. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AtCoderUserValidationForm
participant ClipboardAPI
participant Document
User->>AtCoderUserValidationForm: Click copy button
AtCoderUserValidationForm->>ClipboardAPI: Try navigator.clipboard.writeText()
alt Clipboard API succeeds
ClipboardAPI-->>AtCoderUserValidationForm: Success
else Clipboard API fails
AtCoderUserValidationForm->>Document: Create textarea, select, execCommand('copy')
Document-->>AtCoderUserValidationForm: Fallback result
end
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/lib/components/AtCoderUserValidationForm.svelte (1)
6-20: Solid clipboard implementation with minor suggestion for improvement.The implementation correctly uses the modern Clipboard API with an appropriate fallback for older browsers. The async/await pattern and error handling are well implemented.
Consider a minor improvement to the fallback implementation for better user experience:
} catch (error) { // Fallback for older browsers that do not support the Clipboard API const textArea = document.createElement('textarea'); textArea.value = text; + textArea.style.position = 'fixed'; + textArea.style.opacity = '0'; document.body.appendChild(textArea); textArea.focus(); textArea.select(); - document.execCommand('copy'); + try { + document.execCommand('copy'); + } catch (fallbackError) { + console.error('Both Clipboard API and fallback failed:', error, fallbackError); + } document.body.removeChild(textArea); console.log('Failed to copy text using Clipboard API, fallback used:', error); }This improvement:
- Hides the temporary textarea from view
- Adds error handling for the deprecated
document.execCommand- Provides better error reporting if both methods fail
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
package.json(0 hunks)src/lib/components/AtCoderUserValidationForm.svelte(1 hunks)tailwind.config.ts(1 hunks)
💤 Files with no reviewable changes (1)
- package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: preview
🔇 Additional comments (2)
tailwind.config.ts (1)
12-12: Clean removal of stwui plugin.The removal of stwui plugin from the plugins array is consistent with the PR objective to eliminate the stwui dependency.
src/lib/components/AtCoderUserValidationForm.svelte (1)
5-5: Good planning for future migration.The TODO comment appropriately acknowledges the temporary nature of this implementation and plans for using Flowbite's component when available.
KATO-Hiro
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.
LGTM
close #2205
Summary by CodeRabbit