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

Live preview #323

Merged
merged 29 commits into from
Jan 17, 2023
Merged

Live preview #323

merged 29 commits into from
Jan 17, 2023

Conversation

Findeton
Copy link
Contributor

@Findeton Findeton commented Dec 13, 2022

Parent issue: https://github.com/sequentech/epi/issues/10

This PR adds the ability to open the live preview for an election before creating the election.

Changes

  • In the last step of the election creation, the pencil button for editing the election json is removed.
  • Instead, an actions dropdown menu is added, with two options: Edit JSON and Live Preview.
  • When the Live Preview option is clicked, the Election creation JSON is stored in sessionStorage and the live preview voting booth is opened in another tab.
  • Parent-children elections must define the election ids. A check has been added and an error is shown in the case the ids are missing. If there's an error checking the election creation Json, the Live Preview option will become unavailable.
  • As the data passed to the voting booth is the Election creation JSON, the process of converting that JSON into the JSON of an already created JSON will also be used in the voting booth. That code is moved to the common-ui to be shared with the voting booth.

@Findeton Findeton changed the title (DRAFT) Live preview Live preview Dec 27, 2022
@Findeton Findeton marked this pull request as ready for review December 27, 2022 19:05
@Findeton Findeton merged commit 6327b4d into master Jan 17, 2023
@Findeton Findeton deleted the live-preview branch January 17, 2023 10:46
Findeton added a commit that referenced this pull request Jan 17, 2023
* wip

* fixes

* wip

* wiP

* fixes

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* refactor

* wip

* support parent children elections

* use session storage

* stringify

* errors

* wip

* no sanitize here..

* disable live preview if errors

* fix
Findeton added a commit that referenced this pull request Jan 17, 2023
* wip

* fixes

* wip

* wiP

* fixes

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* refactor

* wip

* support parent children elections

* use session storage

* stringify

* errors

* wip

* no sanitize here..

* disable live preview if errors

* fix
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.

1 participant