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

Syv followup constituency first baob only #3

Open
wants to merge 32 commits into
base: master
Choose a base branch
from

Conversation

baob
Copy link
Owner

@baob baob commented Nov 17, 2024

Really - for testing fixes to swapmyvote#1023 - "Resolve hound complaint about Rails/I18nLocaleTexts found in .rubocop..yml"

tdg and others added 29 commits October 29, 2024 17:46
Added link and UK/ USA cousin disambiguation text and link
This is a combination of 7 commits.

HACKING towards constituency first - step 1-6

unsuccessful in getting the hidden field really hidden. I suspect some CSS skills required
Relates to swapmyvote/swapyourvote-usa#24

1. the method prepopulate_fields_from_session was referencing parties
   before the state had even been defined (part of the api/prepopulate
   code)

2. the 'pre_login' code that sequences state-then-candidates questions
   was unecessarily messing with the session parameters associated with
   api/prepopulate.
the spec should be moved to the page that does the constituency selection
This is a combination of 3 commits.

add postcode field to constituency selection BUT NOT WORKING
add postcodes helper to home page (now has constituencies form)
fixed postcode helper to work on home page
partially addresses comment on commit 3a94e85
now fully addresses comment on commit 3a94e85
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

Error: unrecognized cop or department Rails/I18nLocaleTexts found in .rubocop...
Error: unrecognized cop or department Rails/I18nLocaleTexts found in .rubocop.yml
Did you mean `Rails/I18nLocaleAssignment`?

- if !pre_login_constituency_form_complete
= render partial: "constituency_form", locals: { constituencies: @constituencies, default_constituency_ons_id: @default_constituency_ons_id }
- else
= render partial: "candidates_form", locals: { parties: @parties, preferred_party_id: @preferred_party_id, willing_party_id: @willing_party_id, constituency_ons_id: @constituency_ons_id }
Copy link

Choose a reason for hiding this comment

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

Avoid using instance variables in partials views

cast your preferred vote in a different area where it could count for more.
In return, you will cast their preferred vote in your area.
- if !pre_login_constituency_form_complete
= render partial: "constituency_form", locals: { constituencies: @constituencies, default_constituency_ons_id: @default_constituency_ons_id }
Copy link

Choose a reason for hiding this comment

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

Avoid using instance variables in partials views

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.

3 participants