Skip to content
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

UI: Implement /crates/:name/delete route #10177

Merged
merged 2 commits into from
Dec 11, 2024
Merged

Conversation

Turbo87
Copy link
Member

@Turbo87 Turbo87 commented Dec 10, 2024

This partially implements step 2 of #9352. The missing piece after this PR is a "Delete" button in the crate settings tab, since the new route is currently only reachable by typing it directly in the URL bar. I opted for this hidden route for now to be able to test it out first before making it more public.

Related:

Screenshots

Screen Shot 2024-12-09 at 15 58 28
Screen Shot 2024-12-09 at 15 57 41

@Turbo87 Turbo87 added C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works A-frontend 🐹 labels Dec 10, 2024
@Turbo87 Turbo87 requested a review from a team December 10, 2024 13:46
Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and I agree that doing this as a hidden route to start with makes sense.

In terms of review, nothing substantive, but a few suggestions below.

app/controllers/crate/delete.js Outdated Show resolved Hide resolved
app/templates/crate/delete.hbs Outdated Show resolved Hide resolved
app/templates/crate/delete.hbs Outdated Show resolved Hide resolved
app/templates/crate/delete.hbs Outdated Show resolved Hide resolved
The crate deletion endpoint is our first one that uses "422 Unprocessable Entity" HTTP errors, but it looks like Ember Data is expecting a slightly different layout for them. Since we don't need the special handling code in Ember Data, we can disable the extra code path and treat them like any other 4xx error.
@Turbo87
Copy link
Member Author

Turbo87 commented Dec 11, 2024

rebased and all feedback incorporated :)

@Turbo87 Turbo87 merged commit c758f8c into rust-lang:main Dec 11, 2024
9 checks passed
@Turbo87 Turbo87 deleted the delete-ui branch December 11, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend 🐹 C-enhancement ✨ Category: Adding new behavior or a change to the way an existing feature works
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants