-
Notifications
You must be signed in to change notification settings - Fork 212
Update: remove downgrade options #2817
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
Console (appwrite/console)Project ID: Tip SSR frameworks are fully supported with configurable build runtimes |
WalkthroughThis pull request modifies the plan change downgrade flow in the organization console. The changes include removing the InputSelect import from the forms module, updating the Fieldset legend text from "Feedback" to "Reason for plan change", and replacing the InputSelect component with a commented-out block while preserving only the InputTextarea for user feedback. The placeholder text is updated to "Please enter your feedback" and a previously used label is removed. Overall, the modification eliminates the selectable reason dropdown in favor of a text-only feedback input. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. 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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/routes/(console)/organization-[organization]/change-plan/+page.svelte (1)
153-162:⚠️ Potential issue | 🔴 CriticalBug:
feedbackDowngradeReasonis never set, causingreasonto always beundefined.The
InputSelectthat boundfeedbackDowngradeReasonis commented out, so this variable remainsundefined. Thefind()will never match, and the API call will always receivereason: undefined.Either remove the reason lookup entirely or restore the InputSelect.
🐛 Proposed fix if removing the reason field
async function trackDowngradeFeedback() { await sdk.forConsole.organizations.createDowngradeFeedback({ organizationId: data.organization.$id, - reason: feedbackDowngradeOptions.find( - (option) => option.value === feedbackDowngradeReason - )?.label, + reason: null, message: feedbackMessage ?? '', fromPlanId: data.organization.billingPlanId, toPlanId: selectedPlan.$id }); }
🤖 Fix all issues with AI agents
In `@src/routes/`(console)/organization-[organization]/change-plan/+page.svelte:
- Around line 8-9: Remove the dead import feedbackDowngradeOptions from the
import list in +page.svelte and delete the unused variable declaration that
referenced it; update the trackDowngradeFeedback function to stop referencing
feedbackDowngradeOptions (remove that branch/parameter or replace with the
current data flow), and clean up any commented InputSelect usage or related
references so there are no lingering references to feedbackDowngradeOptions,
InputSelect, or the removed variable.
🧹 Nitpick comments (2)
src/routes/(console)/organization-[organization]/change-plan/+page.svelte (2)
454-460: Remove commented-out code instead of leaving it in place.Commented-out code adds noise and confusion. If this feature is being removed, delete the code entirely. Version control preserves history if it's ever needed again. As per coding guidelines, reserve comments for TODOs or complex logic explanations.
♻️ Proposed fix
<Fieldset legend="Reason for plan change"> <Layout.Stack gap="xl"> - <!--<InputSelect - id="reason" - label="Reason for plan change" - placeholder="Select one" - required - options={feedbackDowngradeOptions} - bind:value={feedbackDowngradeReason} />--> <InputTextarea id="comment" required placeholder="Please enter your feedback" bind:value={feedbackMessage} /> </Layout.Stack> </Fieldset>
461-465: Consider adding a label for accessibility.The
InputTextareapreviously had a label but it was removed. Screen readers rely on labels to announce form fields. Consider addinglabel="Feedback"or usingaria-labelif a visible label is not desired.♿ Proposed fix
<InputTextarea id="comment" + label="Feedback" required placeholder="Please enter your feedback" bind:value={feedbackMessage} />

What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.