-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Rework delete org and rename org UI #34762
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?
Conversation
options/locale/locale_en-US.ini
Outdated
|
||
settings.rename = Rename Organization | ||
settings.rename_desc = Changing the organization name will also change your organization's URL and free the old name. | ||
settings.rename_success = Organization %s have been renamed to %s successfully. |
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.
%[1]s
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.
|
||
// SettingsRename response for renaming organization | ||
func SettingsRename(ctx *context.Context) { | ||
form := web.GetForm(ctx).(*forms.RenameOrgForm) |
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.
Just curious why introduce a new "RenameOrgForm" struct.
Are the errors properly processed if the form validation fails?
Or it should be as simple as read the values by FormString?
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.
templates/org/settings/options.tmpl
Outdated
</div> | ||
<div class="required field"> | ||
<label for="org_name_to_delete">{{ctx.Locale.Tr "org.org_name_holder"}}</label> | ||
<input id="org_name_to_delete" name="org_name" required> |
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.
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.
What's the problem of the original implementation
Renaming organization will mix with organization's information change make the operation difficult to keep consistent.
This PR created a danger zone like what's repository setting. It also moved organization's
rename
anddelete
operations to this zone. The original updating repository will not change the name any more.This is also a step to extract the
updaterepository
function completely.Before:
After: