-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add usage indicator instead of upgrade button #10186
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
Conversation
Signed-off-by: Artem Savchenko <armisav@gmail.com>
|
Connected to Huly®: UBERF-14022 |
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 replaces the previous upgrade button with a usage indicator that displays storage and bandwidth usage visually. The changes consolidate subscription state management into a centralized store and provide users with a continuous view of their workspace resource consumption.
- Introduces a subscription store to centralize workspace limits and usage state management
- Replaces UpgradeButton component with LimitsIndicator showing visual progress bars for storage/bandwidth
- Adds comprehensive workspace limit checking functionality with proper error handling
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/billing/src/plugin.ts | Updates component reference from UpgradeButtonExt to UsageExtension |
| plugins/billing-resources/src/utils.ts | Adds subscription store management, workspace limit checking, and usage calculation functions |
| plugins/billing-resources/src/stores/subscription.ts | New centralized store for subscription state and usage information |
| plugins/billing-resources/src/index.ts | Updates component exports to use LimitsIndicator instead of UpgradeButton |
| plugins/billing-resources/src/components/WorkbenchExtension.svelte | Adds role-based access control for showing usage extension |
| plugins/billing-resources/src/components/UsageSection.svelte | Updates to handle nullable usage data and use centralized limit calculations |
| plugins/billing-resources/src/components/UsageProgressBar.svelte | New progress bar component with color-coded usage levels |
| plugins/billing-resources/src/components/UsageProgress.svelte | Minor styling adjustment for label spacing |
| plugins/billing-resources/src/components/UsagePopup.svelte | New popup component for detailed usage information |
| plugins/billing-resources/src/components/UpgradeButton.svelte | Removed old upgrade button component |
| plugins/billing-resources/src/components/Subscriptions.svelte | Removes unused loading state variable |
| plugins/billing-resources/src/components/LimitsIndicator.svelte | New main component displaying usage indicators with workspace change handling |
plugins/billing-resources/src/components/LimitsIndicator.svelte
Outdated
Show resolved
Hide resolved
Signed-off-by: Artem Savchenko <armisav@gmail.com>
Signed-off-by: Artem Savchenko <armisav@gmail.com>
|
Ok but the main icon is unreadable |
Before:


After: