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

Disable the create booths button when the polls function is disabled #5104

Conversation

markusgeert
Copy link
Contributor

References

Fixes:

Objectives

What are the objectives of these changes?

Prevent the admin from trying to create booths when this is not possible, by disabling the button when the polls feature is disabled.

Visual Changes

Any visual changes? please attach screenshots (or gifs) showing them.

Down at the /admin/budgets/{budget-id} page, the 'Create booths' button looks at follows when the polls feature is disabled:

create-booths

@javierm
Copy link
Member

javierm commented Apr 24, 2023

@markusgeert Thank you for your pull request! And apologies in advance because there are a few pending pull requests in our queue so getting to this one will take some time 🙏.

@taitus taitus self-assigned this May 23, 2023
Copy link
Member

@taitus taitus left a comment

Choose a reason for hiding this comment

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

Hi @markusgeert,

Thank you very much for the PR 👏

Here are two small suggestions about the code, what do you think?

On the other hand, Would it be possible to add some tests to validate that everything is working correctly? 🙏

Greetings.

app/components/admin/budgets/actions_component.rb Outdated Show resolved Hide resolved
app/components/admin/budgets/actions_component.rb Outdated Show resolved Hide resolved
@taitus taitus force-pushed the feature/disable-create-booths-button branch from c382f54 to 48c99eb Compare May 29, 2023 12:56
@taitus
Copy link
Member

taitus commented May 29, 2023

Hi @markusgeert

Thanks for apply the review 👏

I have just added the Spanish translations and add this change I got confused when I suggested the change to use the feature? method 🙏

If you feel up to it, the only thing missing would be to add a test and we could merge the PR 🥳

Greetings!

@taitus taitus moved this from Reviewing to Doing in Consul Democracy May 29, 2023
@taitus taitus force-pushed the feature/disable-create-booths-button branch from 48c99eb to 2b01068 Compare May 29, 2023 13:53
@markusgeert
Copy link
Contributor Author

I added the Dutch translation and two tests that validate the enabled/disabled behavior. Let me know if there's anything else that should be added or changed.

@javierm
Copy link
Member

javierm commented May 31, 2023

Hi, @markusgeert 😄.

Regarding the Dutch translation you just mentioned, would it be possible to add it through our Crowdin project instead, once this pull request is merged?

The reason I'm asking is as follows: for languages other than English and Spanish, our Crowdin bot takes whatever is in Crowdin and uses it to replace what's in this repository, meaning that, if we include Dutch translations in this pull request, they will be deleted by Crowdin.

Thanks!

@javierm javierm moved this from Doing to Reviewing in Consul Democracy May 31, 2023
@javierm javierm moved this from Reviewing to Doing in Consul Democracy May 31, 2023
@markusgeert
Copy link
Contributor Author

Hi @javierm,

I'll add it to Crowdin, no problem 🙂 . On a different note, I saw on Crowdin that a lot of the dutch translations have an English translation as the accepted answer, even though there's a dutch translation available. Should I open a new issue about this?

Regarding this PR, I think it is ready to merge now 👌.

@taitus taitus closed this Jun 2, 2023
@taitus taitus force-pushed the feature/disable-create-booths-button branch from f1d4526 to 1392733 Compare June 2, 2023 08:04
@taitus
Copy link
Member

taitus commented Jun 2, 2023

Hi @markusgeert ,

I did a hard reset of your branch to master, and then included your commits. But when I did the first upload, the PR was closed because it didn't detect changes with master

Now when I try to add your commits to your branch I can't because I don't have permissions "permission denied".

I find it strange as I added changes to your commits the other day without any problems.

I'll see if I can fix it.

Sorry for the inconvenience 🙏

@markusgeert
Copy link
Contributor Author

Alright, no worries. I can also give you commit rights to my fork if that helps?

@taitus
Copy link
Member

taitus commented Jun 2, 2023

@markusgeert

Alright, no worries. I can also give you commit rights to my fork if that helps?

If it's not too much trouble for you, we can try this way and see if I can upload your changes again 🙏

@taitus taitus reopened this Jun 2, 2023
@taitus
Copy link
Member

taitus commented Jun 2, 2023

@markusgeert Thanks! And sorry for the inconvenience.

@taitus taitus force-pushed the feature/disable-create-booths-button branch from e2e9edc to 539373c Compare June 2, 2023 09:11
Consul Democracy automation moved this from Doing to Testing Jun 2, 2023
@javierm javierm force-pushed the feature/disable-create-booths-button branch from 539373c to 9cc0834 Compare June 23, 2023 12:28
@javierm javierm self-assigned this Jun 23, 2023
@javierm javierm force-pushed the feature/disable-create-booths-button branch from 9cc0834 to 13bf866 Compare June 23, 2023 13:20
@javierm
Copy link
Member

javierm commented Jun 23, 2023

I've updated the changes to the latest master branch and fixed a typo in the Spanish translation.

@markusgeert Thanks a lot! 🎉

@javierm javierm merged commit ec1fe1f into consuldemocracy:master Jun 23, 2023
8 of 9 checks passed
Consul Democracy automation moved this from Testing to Release 2.0.0 Jun 23, 2023
@javierm javierm added the Admin label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants