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

[#911] Added configuration options and logic to hide unused functionality #371

Merged
merged 4 commits into from
Dec 12, 2022

Conversation

Bartvaderkin
Copy link
Contributor

@Bartvaderkin Bartvaderkin commented Dec 8, 2022

We had to do some interpretation on the ticket, because Actions are a thing with or without Plan/Samenwerken.

So I made it so there is an option to disable Samenwerken and remove it from menu but keep general Action functionality, and another option to also disable the general Actions (which requires disabled Plan).

Additionally there was an ask to hide QuestionaireStep (Zelfcheck) if there are no published QuestionaireStep's, which was more of a bug-fix then a feature request.

It might make sense to overview the code per-commit as they are reasonably clean.

Bart van der Schoor added 4 commits December 8, 2022 11:01
…le page

But only if Samenwerken(plans) isn't enabled (because Plans re-use part of the Action views and user interaction)
This catches the edge case where Plan's are disabled after users were assigned tasks so we can't link back to the plan
@codecov-commenter
Copy link

Codecov Report

Merging #371 (cb4802b) into develop (20982a1) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #371      +/-   ##
===========================================
+ Coverage    96.51%   96.56%   +0.04%     
===========================================
  Files          457      461       +4     
  Lines        14452    14629     +177     
===========================================
+ Hits         13949    14126     +177     
  Misses         503      503              
Impacted Files Coverage Δ
...pen_inwoner/components/templatetags/header_tags.py 100.00% <ø> (ø)
src/open_inwoner/configurations/admin.py 100.00% <ø> (ø)
src/open_inwoner/utils/context_processors.py 90.90% <ø> (ø)
.../open_inwoner/accounts/tests/test_profile_views.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/views/actions.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/views/profile.py 100.00% <100.00%> (ø)
...pen_inwoner/components/templatetags/action_tags.py 100.00% <100.00%> (ø)
...ns/migrations/0027_siteconfiguration_show_plans.py 100.00% <100.00%> (ø)
.../migrations/0028_siteconfiguration_show_actions.py 100.00% <100.00%> (ø)
src/open_inwoner/configurations/models.py 92.30% <100.00%> (+0.41%) ⬆️
... and 6 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Bartvaderkin Bartvaderkin marked this pull request as ready for review December 12, 2022 10:10
def clean(self):
super().clean()

if self.show_plans and not self.show_actions:
Copy link
Member

Choose a reason for hiding this comment

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

Netjes opgelost :)

@alextreme alextreme merged commit 6d81239 into develop Dec 12, 2022
@alextreme alextreme deleted the feature/911-disable-functionality branch December 12, 2022 11:14
Copy link
Contributor

@vaszig vaszig left a comment

Choose a reason for hiding this comment

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

Tested locally, works as expected. Only one remark about the separate migrations but no worries, especially now that's merged!

@alextreme
Copy link
Member

@vaszig thanks, glad you double-checked 👍

@Bartvaderkin
Copy link
Contributor Author

@vaszig I don't see it here but I'm still interested about the migration feedback, but anyway, there are two because I was trying to make clean commits instead of piling everything into one.

@vaszig
Copy link
Contributor

vaszig commented Dec 12, 2022

@vaszig I don't see it here but I'm still interested about the migration feedback, but anyway, there are two because I was trying to make clean commits instead of piling everything into one.

Yes, it's clear enough. It makes sense to have them separately according to the nice and clear functionality-based commits.

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.

4 participants