Skip to content

Fix redirects on user settings introduced by menu refactoring #3975

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

Merged
merged 2 commits into from
Jun 18, 2018

Conversation

daviian
Copy link
Member

@daviian daviian commented May 16, 2018

Adresses #3974

Settings pages that host more than one modules now load missing data after POST requests.

@daviian daviian force-pushed the bugfix/openid-redirect branch from 9751f02 to 8fd9a70 Compare May 16, 2018 12:01
@lunny lunny added the type/bug label May 16, 2018
@lunny lunny added this to the 1.5.0 milestone May 16, 2018
@codecov-io
Copy link

codecov-io commented May 16, 2018

Codecov Report

Merging #3975 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3975      +/-   ##
==========================================
- Coverage   19.97%   19.96%   -0.01%     
==========================================
  Files         153      153              
  Lines       30524    30523       -1     
==========================================
- Hits         6097     6094       -3     
- Misses      23513    23514       +1     
- Partials      914      915       +1
Impacted Files Coverage Δ
routers/user/setting/profile.go 0% <0%> (ø) ⬆️
routers/user/setting/applications.go 0% <0%> (ø) ⬆️
routers/user/setting/security_openid.go 0% <0%> (ø) ⬆️
routers/user/setting/account.go 12.5% <0%> (-0.31%) ⬇️
routers/user/setting/keys.go 0% <0%> (ø) ⬆️
routers/user/setting/security.go 0% <0%> (ø) ⬆️
modules/process/manager.go 69.56% <0%> (-4.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e39f3d...ccde40e. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 16, 2018
@lafriks
Copy link
Member

lafriks commented May 16, 2018

Doesn't changes won't be lost on redirect?

@daviian
Copy link
Member Author

daviian commented May 16, 2018

What changes do you mean? The flash messages?

@daviian
Copy link
Member Author

daviian commented May 16, 2018

@lafriks Ah ok I get it. You mean the form data? Actually this was only implemented in a few situations, but if we want it for all settings I can change that of course.

@daviian
Copy link
Member Author

daviian commented May 16, 2018

@lafriks I had a look on how to implement that for all settings. However it is not a small change. So maybe we should postpone the prefilling of forms until this and the refactoring PR's are merged.

@daviian daviian changed the title Fix redirects on user settings introduced by menu refactoring [WIP] Fix redirects on user settings introduced by menu refactoring May 16, 2018
@daviian daviian force-pushed the bugfix/openid-redirect branch from c481503 to 9e9e56b Compare May 16, 2018 18:07
@daviian daviian changed the title [WIP] Fix redirects on user settings introduced by menu refactoring Fix redirects on user settings introduced by menu refactoring May 16, 2018
@daviian
Copy link
Member Author

daviian commented May 16, 2018

@lafriks @JonasFranzDEV I've changed the PR to just load missing data, but IMO this can be done better. But think this should be done in a separate PR and after all the other PR's regarding the settings are merged.

@daviian daviian force-pushed the bugfix/openid-redirect branch from 9e9e56b to 1e0bc04 Compare May 17, 2018 09:15
@daviian
Copy link
Member Author

daviian commented May 17, 2018

I've rebased the changes with master, so the previous refactoring is now included.

Furthermore I have to annotate that because we don't redirect back to the original settings page some links defined on these pages don't work properly after submitting a form with an error as url differs.
Will send another PR that adresses this issues.

@daviian daviian force-pushed the bugfix/openid-redirect branch 2 times, most recently from d703ea9 to 8b00469 Compare June 13, 2018 08:42
@@ -32,6 +32,7 @@ const (
func Profile(ctx *context.Context) {
ctx.Data["Title"] = ctx.Tr("settings")
ctx.Data["PageIsSettingsProfile"] = true

Copy link
Member

Choose a reason for hiding this comment

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

Why this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thought it is more consistent with the rest of the code base.
But of course I can remove it :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@JonasFranzDEV Do you want me to remove it?

@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 15, 2018
@daviian daviian force-pushed the bugfix/openid-redirect branch from 8b00469 to 032292d Compare June 15, 2018 14:58
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 18, 2018
@techknowlogick
Copy link
Member

make LG-TM work

@techknowlogick techknowlogick merged commit 69bfd81 into go-gitea:master Jun 18, 2018
@daviian daviian deleted the bugfix/openid-redirect branch June 18, 2018 18:30
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants