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

Hide flag name in condition edit form #46

Merged
merged 3 commits into from
Feb 25, 2020
Merged

Hide flag name in condition edit form #46

merged 3 commits into from
Feb 25, 2020

Conversation

willbarton
Copy link
Member

This PR changes the FlagStateForm to hide the flag name field. The flag name field was already read-only, and was appearing in the Wagtail admin as blank. The field is now hidden.

Before:
image

After:
image

This PR also removes the deprecated WAGTAILFLAGS_ADMIN_BIG_LIST flag for the big-list-of-all-flags-and-conditions admin UI.

The `WAGTAILFLAGS_ADMIN_BIG_LIST` flag was to allow us to test whether we wanted to use the new(ish) Wagtail Flags UI, and we did.

This change removes all the old one-big-list-of-flags-and-conditions
Copy link
Contributor

@cwdavies cwdavies left a comment

Choose a reason for hiding this comment

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

The changes to hide flag name from the form has been completed and verified.
It might be worth fixing the lint errors in views.py and test_views.py for:

F401 'django.shortcuts.resolve_url' imported but unused
F401 'flags.state.flag_enabled' imported but unused
F401 'django.test.override_settings' imported but unused

@Scotchester
Copy link
Contributor

I will miss the big list, but apparently I'm the only one, so I won't put up too much of a stink 😛

This change hides the flag name field from condition creation and edit forms. The field was not editable by users, because the flag name is always provided.

The field had been rendering as blank, despite having the value filled in. This change moves it to a hidden field.
@willbarton
Copy link
Member Author

It might be worth fixing the lint errors

Indeed! I've done so.

@cwdavies cwdavies self-requested a review February 25, 2020 19:44
Copy link
Contributor

@cwdavies cwdavies left a comment

Choose a reason for hiding this comment

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

The changes to hide flag name from the form has been completed and verified.
Thanks for fixing the lint errors in views.py and test_views.py

@willbarton willbarton merged commit 863679b into master Feb 25, 2020
@willbarton willbarton deleted the hide-flag-name branch February 25, 2020 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants