Skip to content

Redesign: forms validation#10921

Merged
ferblape merged 2 commits intofeature/redesignfrom
feature/redesign-forms
Jun 5, 2023
Merged

Redesign: forms validation#10921
ferblape merged 2 commits intofeature/redesignfrom
feature/redesign-forms

Conversation

@Crashillo
Copy link
Copy Markdown
Contributor

@Crashillo Crashillo commented May 29, 2023

🎩 What? Why?

Use custom classes to hide the validation errors onload, instead of the default HTML pseudo-classes

📌 Related Issues

♥️ Thank you!

Copy link
Copy Markdown
Contributor

@ferblape ferblape left a comment

Choose a reason for hiding this comment

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

Tested in the signup form:

  • client errors aren't displayed by default
  • client error messages appear if the conditions are not satisfied
  • client error messages disappear when the condition is satisfied

👍🏾

Screenshot 2023-06-01 at 10 08 45

@ferblape ferblape requested a review from a team June 1, 2023 08:10
Copy link
Copy Markdown
Member

@carolromero carolromero left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@ferblape ferblape requested a review from a team June 2, 2023 02:23
* feature/redesign:
  Redesign: amendments (#10765)
  Redesign: proposals (#10555)
  Remove unused preset-env dependencies (#10916)
Copy link
Copy Markdown
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

LGTM. Tested on new Proposal form, and the validation error were not present.

@ferblape ferblape merged commit 89d7718 into feature/redesign Jun 5, 2023
@ferblape ferblape deleted the feature/redesign-forms branch June 5, 2023 03:35
entantoencuanto added a commit that referenced this pull request Jun 5, 2023
After merging #10921 the related tests are passing and can be enabled
again
@entantoencuanto entantoencuanto mentioned this pull request Jun 5, 2023
entantoencuanto added a commit that referenced this pull request Jun 5, 2023
…design-staging

* feature/redesign-form-validation-tests:
  Unskip tests
  use foundation classes instead of default html validation (#10921)
entantoencuanto added a commit that referenced this pull request Jun 5, 2023
…rafts

* feature/redesign:
  use foundation classes instead of default html validation (#10921)
entantoencuanto added a commit that referenced this pull request Jun 5, 2023
After merging #10921 the related tests are passing and can be enabled
again
entantoencuanto added a commit that referenced this pull request Jun 5, 2023
After merging #10921 the related tests are passing and can be enabled
again
ferblape pushed a commit that referenced this pull request Jun 7, 2023
* aside from collaborative draft index

* list of collaborative drafts

* define card L & metadata

* main from collaborative draft show

* aside from collaborative draft show

* fix links between versions

* redesign forms

* fix erblint

* fix i18n

* expand button

* normalize i18n

* fix css glitches collaborative drafts

* Remove index from collaborative drafts versions

* include version links in the aside as well

* avoid warning rspec

* create assets for proposals (partial cherrypicked f1e2324)

* move "create proposal" to the last position

* collaborative drafts states

* fix tests cell

* fix state text for show

* fix tests

* fix tests

* Update decidim-proposals/config/locales/en.yml

Co-authored-by: Carolina Romero <carolromero@users.noreply.github.com>

* Redesign: assemblies content blocks (#10573)

* Declare participatory spaces content blocks scope name in manifest and extract to a controller concern

* Add admin management of content blocks in assemblies

* Register html content block in assemblies

* Get content block scope name from space manifest in participatory processes

* Make use of manifest to obtain scope_class and base model in spaces content blocks

* Register content blocks of documents and images in assemblies using core cell

* Use core content blocks for images and documents on processes and remove unnecesary ones

* Use core content blocks for announcement on processes and assemblies and remove unnecesary ones

* Use core content blocks for last activities on processes and assemblies and remove unnecesary ones

* Define stats content block for assemblies and register it

* Register highlighted results, meetings, posts and proposals content blocks for assemblies

* Move participatory processes hero content block to generic block in core

* Register hero block for assemblies

* Remove hero block from assembly layout header

* Change assembly_nav_items helper method to accept participatory space argument

* Define and register main data content block cell for assemblies

* Define and register metadata content block for assemblies

* Define children assemblies cell

* Reorder content blocks

* Change div class wrapping assemblies list on cell

* Allow configuring title on assemblies cell and set it on content blocks using it

* Change query of related processes cell depending on participatory space class

* Hide related assemblies and processes cell if there are no elements to show

* Change default max results on featured processes and assemblies content blocks

* Fix condition

* Recover partial used by old layout

This partial is expected to be removed after fully enabling redesign

* Remove static content blocks from assembly show and remove deprecated partials

* Move assembly breadcrumb in show

* Remove unused translation

* Remove deprecated assembly card-g show

The generation of the view is done by the parent class

* Fix selector in test

* Update selectors in test

* Add trait to include content blocks in assemblies factories and use them to fix examples

* Fix shared examples for assemblies adding content blocks

* Hide stats content blocks if processes or assemblies disable show statistics

* Update assembly show tests

This test adds the content blocks required to test the contents and
updates the selectors changed with the redesign

* Unify tests

* remove data attribute from process_header partial pending of redesign

* Allow participatory space hero cell to define and include a cta link

* Define specific hero_cell for processes to include CTA item

* Update tests to check CTA in hero content block

* Update assembly members spec

* Skip filters tests temporarily on assemblies index pending of filters branch merge

* Update tests after changing default max results values

* Allow the insertion of hooks in card metadata cell

* Add upcoming_meeting_for_card hook in assembly card-g metadata

* Change upcoming_meeting_for_card hook output depending of redesign enablement

* Adapt test

* Fix content_block_scope_name in process group landing page admin controller

* Ensure that no content blocks related to inactive modules are registered

* Change sanitize method for short description on assembly main data cell

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>

* Add with_type to assemblies ransackable scopes

* Integrate assemblies index filter

* Adapt assemblies filters tests to redesign

* Skip failing test extracted to an issue

* Ignore unused assemblies filters keys translations

* Update filter params in test

---------

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>

* Redesign: processes groups content blocks (#10491)

* Pass the options to the metadata cell from card_l and card_g and disable links if the whole card has a link

* Pass in highlighted items for component a show_space option

* Pass the show_space option from some highlighted resources content blocks settings

* Move active content blocks query to controller

* Use generic html cell for corresponding content block on processes groups

* Set component_manifest_name on register of hihglighted resources blocks for processes groups

* Fix selectors in tests of processes groups page

* Add sleep

* Change content statistics content block in processes groups to use the redesigned version

* Update tests

* Remove unnecesary blank spaces

* Fix test to check private space message depending on content blocks configuration

* Remove deprecated examples on steps index page of a participatory process

* Move private space announcement out of content blocks

* Rename registry name of hero content block in processes

* Fix selector in test

* Rename registry name of hero content block in processes

* Fix ambiguous tests

* Fix manifest name in test

* Unify tests

* Update manifest name

* reuse the block-reference styles for the private space

* Remove links to last activities inside a participatory process from content blocks

* Replace processes content block in process groups homepage with redesigned one

* Remove deprecated content block

* Remove unused translations

* Remove deprecated tests

* Add missing cell

* Change metadata content block to inherit from redesigned block

* Replace title content block with main data

* Remove title content block and move translations

* Adapt tests

* Adapt title cell test

* Update icons of metadata content block

* Remove comment

* Move some process group metadata elements to title block

* Update tests

* Add missing view

* set styles for process-group metadata

* split attributes in two blocks

* Add comment to keep file

* Amend wrong merge conflict resolution

* Use cell of related processes for count in ProcessGroupMetadataCell

* Ensure that no content blocks related to inactive modules are registered

* Change sanitize method for short description on process main data cell

* Change filter of processes content block in groups to allow active or all

* Update processes content block registry to use filter settings

* Add tests to check processes block in porcesses group landing page filter settings

* Add order setting to content block registry

* Translate and sanitize attributes in photo cell

* Remove unused translation

* Avoid exceptions in processes hero content block when there is no active step

---------

Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>

* simplify 2col layout (#10819)

* Redesign: pending login (#10699)

* replace old form (blind, wip)

* user invitation page

* avoid the last-child form__wrapper-block padding-bottom rule

* fix typo

* unused key

* fix erblint

* Redesign: meeting cards (#10722)

* renaming meeting cell due to conflict with cards

* move some styles to the core to avoid loads additional chunks

* wrap body with the dynamic class

* update test markup

* cell spec must call to the cell itself

* update test markup

* fix typo

* update test markup

* useless css binding

* fix test

* move minutes after agenda, from tabs

* include dynamic css class for texts

* meetings metadata items order

* show comments and endorsers even they're zero

* include resource options in the sidebar

* fix test

* Redesign: progress bar (#10638)

* refactor progress bar

* add some animation to the progress bar

* remove deprecated option uses

* remove i18n deprecated

* set numbers to bold

* fix tests

* mark as deprecated for redesign

* fix tests

---------

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>

* Add redesign enable ENV variable to control the pipeline (#10610)

* Add redesign enable ENV variable to control the pipeline

* Change accept_confirm helper method to disable redesign expected selectors on admin interactions

* Update accept_confirm calls with admin

* Add edit link to redesigned wrapper when a component exists

* Fix selector in test

* Add redesign pending widget layout

* Remove deprecated test

* Add skip for redesign pending homepage content block

* Fix expected text

* Add skip for redesign pending homepage content block

* Fix expected menu nav items

* Fix selector in shared test

* Adapt interaction with main navigation dropdown

* Recover confirm data in step navigation cell

* Adapt triggerWarnings method used when iframes are present to redesign

* Fix selector in test

* Redesign: processes groups content blocks (#10491)

* Pass the options to the metadata cell from card_l and card_g and disable links if the whole card has a link

* Pass in highlighted items for component a show_space option

* Pass the show_space option from some highlighted resources content blocks settings

* Move active content blocks query to controller

* Use generic html cell for corresponding content block on processes groups

* Set component_manifest_name on register of hihglighted resources blocks for processes groups

* Fix selectors in tests of processes groups page

* Add sleep

* Change content statistics content block in processes groups to use the redesigned version

* Update tests

* Remove unnecesary blank spaces

* Fix test to check private space message depending on content blocks configuration

* Remove deprecated examples on steps index page of a participatory process

* Move private space announcement out of content blocks

* Rename registry name of hero content block in processes

* Fix selector in test

* Rename registry name of hero content block in processes

* Fix ambiguous tests

* Fix manifest name in test

* Unify tests

* Update manifest name

* reuse the block-reference styles for the private space

* Remove links to last activities inside a participatory process from content blocks

* Replace processes content block in process groups homepage with redesigned one

* Remove deprecated content block

* Remove unused translations

* Remove deprecated tests

* Add missing cell

* Change metadata content block to inherit from redesigned block

* Replace title content block with main data

* Remove title content block and move translations

* Adapt tests

* Adapt title cell test

* Update icons of metadata content block

* Remove comment

* Move some process group metadata elements to title block

* Update tests

* Add missing view

* set styles for process-group metadata

* split attributes in two blocks

* Add comment to keep file

* Amend wrong merge conflict resolution

* Use cell of related processes for count in ProcessGroupMetadataCell

* Ensure that no content blocks related to inactive modules are registered

* Change sanitize method for short description on process main data cell

* Change filter of processes content block in groups to allow active or all

* Update processes content block registry to use filter settings

* Add tests to check processes block in porcesses group landing page filter settings

* Add order setting to content block registry

* Translate and sanitize attributes in photo cell

* Remove unused translation

* Avoid exceptions in processes hero content block when there is no active step

---------

Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>

* simplify 2col layout (#10819)

* Redesign: pending login (#10699)

* replace old form (blind, wip)

* user invitation page

* avoid the last-child form__wrapper-block padding-bottom rule

* fix typo

* unused key

* fix erblint

* Adapt within_use_menu tests helper method to redesign

* Fix selector

* Change temporarily way to reach a path

* Add REDESIGN_PENDING skips to verifications tests inside a component not redesigned yet

* Adapt data_consent tests helper method to redesign

* Fix interaction with add to calendar

* Adapt top bar search test in meetings

* Prepare within_language_menu tests helper method to redesign

* Adapt test

* Use accept_confirm on submit

* Skip tests pending of merge

* Skip test pending of issue resolution

* Change within_language_menu to accept an admin variation

* Add redesign layout to dummy resources controller

* Include required assets in comments invocation from dummy resources show view

* Adapt comments reports shared examples to redesign

* Adapt comments tests to redesign

* Avoid some updates on input character counter js

* Include translation bar in redesigned participatory spaces layouts

* Adapt tests to redesign

* Fix test

* Add REDESIGN_PENDING skips to maybe deprecated examples

* Skip step in meeting creation test pending of redesign of scope selector in front

* Adapt tests to redesign

* Adapt examples to deletion of 'official' metadata item in meetings cards

* Prepare dynamically_attach_file tests helper method to redesigned interface in front

* Use dynamically_attach_file with front interface in verification tests

* Adapt test to front interface attaching files when files are invalid

* Fix wrong condition

* Adapt tests

* Use the right redesigned partial for timeout modal in live event

* Remove commented code

* Unskip examples after follow button redesign

---------

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Hugoren Martinako <aumpfbahn@gmail.com>

* Enable redesign in proposals tests pipeline

* Skip tests REDESIGN_PENDING of other PRs

* Update expected texts in tests

* Skip REDESIGN_PENDING tests which include uploading files

* Skip tests REDESIGN_PENDING of other PRs

* Activate redesign in proposals

* Adapt tests to redesign

* Adapt dynamic attach to redesign when title option is present

* Skip REDESIGN_PENDING test related with validation messages in front forms

* Adapt tests to redesign

* Skip tests REDESIGN_PENDING of proposals PR

* Skip tests REDESIGN_PENDING of other PRs

* Remove has addres checkbox from proposal edition form

* Skip REDESIGN_PENDING interaction in front forms with scopes picker

* Adapt tests to redesign

* Add REDESIGN_PENDING skip related with pending coauthorships display

* Skip REDESIGN_PENDING test pending of other PR

* Add stylelint disable to blank file

* remove deprecated functions and locales

* Fix presenter in metadata cell for coauthors on coauthorable resources

* remove no longer required file

* Update decidim-proposals/app/views/decidim/proposals/collaborative_drafts/new.html.erb

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>

* remove all REDESIGN_PENDING from #10555

* remove all REDESIGN_PENDING from #10765

* Skip example REDESIGN_PENDING of an open issue

* Move filter sections to a helper method

* Add checks to test

* Unskip tests

After merging #10921 the related tests are passing and can be enabled
again

* Add sleep to test

* Ignore title on attachment form method and single file upload

* Unskip test pending of this PR

* Add sleep

* use coauthorship cell from #10846

* Change sleep

* Add check and simplify test

* Skip REDESIGN_PENDING tests failing on GitHub pipeline

* Update decidim-proposals/app/views/decidim/proposals/collaborative_drafts/_edit_form_fields.html.erb

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>

---------

Co-authored-by: Eduardo Martinez Echevarria <eduardomech@gmail.com>
Co-authored-by: Carolina Romero <carolromero@users.noreply.github.com>
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
entantoencuanto added a commit that referenced this pull request Jun 8, 2023
* feature/redesign: (70 commits)
  Fix failing specs
  Redesign sortitions (#10831)
  Redesign: data toggle (#10886)
  Redesign: collaborative drafts (#10729)
  Redesign: pending pages (#10944)
  Redesign: my account (#10904)
  use foundation classes instead of default html validation (#10921)
  Fix failings redesign specs
  Add gitpod support (#10641)
  Fix pipeline after #10409 (#10670)
  Upgrade webpack and other javascript libraries (#10643)
  New Crowdin updates (#10409)
  Refactor attachment title (#10103)
  Fix for exporting hidden moderated proposals (#10630)
  Fix Exception as admin on a Proposal with meeting author (#10628)
  Fix: Deleted and hidden comments are exported (#10629)
  Rename "terms and conditions" to "terms of service" (#10614)
  Upgrade Graphql to 2.0.19 and Graphql-Api to 3.0.1 (#10606)
  Standardize the format of the words "they will" (#10617)
  Fix the spec after word standardization (#10624)
  ...
ferblape pushed a commit that referenced this pull request Jun 12, 2023
* Unskip tests

After merging #10921 the related tests are passing and can be enabled
again

* Unskip tests pending of proposals redesign
entantoencuanto added a commit that referenced this pull request Jun 12, 2023
…blies-details-page

* feature/redesign: (71 commits)
  Unskip tests (#10951)
  Fix failing specs
  Redesign sortitions (#10831)
  Redesign: data toggle (#10886)
  Redesign: collaborative drafts (#10729)
  Redesign: pending pages (#10944)
  Redesign: my account (#10904)
  use foundation classes instead of default html validation (#10921)
  Fix failings redesign specs
  Add gitpod support (#10641)
  Fix pipeline after #10409 (#10670)
  Upgrade webpack and other javascript libraries (#10643)
  New Crowdin updates (#10409)
  Refactor attachment title (#10103)
  Fix for exporting hidden moderated proposals (#10630)
  Fix Exception as admin on a Proposal with meeting author (#10628)
  Fix: Deleted and hidden comments are exported (#10629)
  Rename "terms and conditions" to "terms of service" (#10614)
  Upgrade Graphql to 2.0.19 and Graphql-Api to 3.0.1 (#10606)
  Standardize the format of the words "they will" (#10617)
  ...
entantoencuanto added a commit that referenced this pull request Jun 15, 2023
…ations

* feature/redesign: (78 commits)
  Redesign: initiatives (#10646)
  Redesign: surveys (#10922)
  Redesign: coauthors (#10954)
  remove font-bold from breadcrumb (#10990)
  Redesign: participatory texts (#10941)
  Redesign: budgets (#10195)
  Redesign: fix buttons & geocoder (#10975)
  Unskip tests (#10951)
  Fix failing specs
  Redesign sortitions (#10831)
  Redesign: data toggle (#10886)
  Redesign: collaborative drafts (#10729)
  Redesign: pending pages (#10944)
  Redesign: my account (#10904)
  use foundation classes instead of default html validation (#10921)
  Fix failings redesign specs
  Add gitpod support (#10641)
  Fix pipeline after #10409 (#10670)
  Upgrade webpack and other javascript libraries (#10643)
  New Crowdin updates (#10409)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project: redesign Barcelona City Council contract

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Provide the isolated Abide functionality to the forms Redesign / Blank forms show a client validation even when the form hasn't changed

5 participants