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

Fix wrong investments on the map after voting #5107

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

javierm
Copy link
Member

@javierm javierm commented Apr 26, 2023

Objectives

  • Fix a bug where only the investments on the current page would be on the investments map after voting
  • Simplify the code in the ballot lines controller

This is the only part of the sidebar that needs to be re-rendered after
an AJAX request adding or removing investments to a ballot, so having a
separate view just for it will make it easier to simplify the code.
@javierm javierm self-assigned this Apr 26, 2023
@javierm javierm added this to Reviewing in Consul Democracy Apr 26, 2023
We were rendering the whole sidebar again, which wasn't necessary since
most of it remains unchanged. This resulted in complicated code to pass
the necessary information to render the same map that was already
rendered. Furthermore, when users had been moving the map around or
zooming out, we were resetting the map to its default settings after
voting, which was potentially annoying.

This also fixes the wrong investments being displayed in the map after
voting; only the investments on the current page were displayed in this
case while the index displayed all of them.
@javierm javierm force-pushed the fix_map_investments_after_voting branch from ef03624 to 4954038 Compare April 27, 2023 15:40
@taitus taitus self-assigned this Apr 28, 2023
Consul Democracy automation moved this from Reviewing to Testing Apr 28, 2023
@javierm javierm merged commit eaf28ef into master Apr 28, 2023
9 checks passed
Consul Democracy automation moved this from Testing to Release 2.0.0 Apr 28, 2023
@javierm javierm deleted the fix_map_investments_after_voting branch April 28, 2023 13:44
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

2 participants