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

(5) Refactor Person with BaseFormComponent #351

Closed
Robin481 opened this issue Mar 27, 2020 · 1 comment · Fixed by #519
Closed

(5) Refactor Person with BaseFormComponent #351

Robin481 opened this issue Mar 27, 2020 · 1 comment · Fixed by #519
Assignees
Labels
plan needs to be planned

Comments

@Robin481
Copy link
Member

Robin481 commented Mar 27, 2020

The aim of this issue is to refactor the Person-edit and Person-new into a single component called Person-form using the base-form-component.js as base component
As a reference, you can use education-form.js. Be aware that the base-form-component has different hooks provided for the submit action.
Always work with the record instance variable that is declared in the base-form-component. Set it based on whether you pass a record via component parameters or not.
Use education-form.js as a reference for that. For distinguishing behaviour between new and edit action, you can just check whether the record has an id or not.

Definition of Done:

@Robin481 Robin481 added the PSE label Mar 27, 2020
@Robin481 Robin481 added plan needs to be planned and removed PSE labels May 11, 2020
@Robin481 Robin481 added the PSE label Mar 19, 2021
@Robin481 Robin481 changed the title Refactor Person with BaseComponent Refactor Person with BaseFormComponent Feb 27, 2023
@Robin481 Robin481 changed the title Refactor Person with BaseFormComponent (5) Refactor Person with BaseFormComponent Feb 27, 2023
@kcinay055679 kcinay055679 self-assigned this Feb 27, 2023
@Robin481 Robin481 removed the PSE label Mar 13, 2023
@lkleisa lkleisa mentioned this issue Apr 5, 2023
@lkleisa
Copy link
Collaborator

lkleisa commented Apr 5, 2023

Bugs we found in current state:

  1. When you have the form open and select another person in dropdown without closing the form first, it leads to the form of the newly selected person, this form also can't be closed, since the buttons to save and close the form belongs to the normal profile component, that doesn't render anymore.
    Like we already recommended, put the buttons on the form with an Emitter anyways since it leads to confusion (besides fixing the actual bug)
  2. When you choose a new profile image and you open the form again, then image is the picture which was set before the new one. If you leave the form without changing any attribute, then there will always be the old image in the edit state. If you change something else while editing, then the image is right selected on edit state.
  3. No matter what you save in the form, without changing the profile picture, the changed picture successfully message will always appear.
  4. When the user is a dual citizen, the form always loads as a normal citizen, that means in the edit state there is always just one country and the checkbox for dual citizen isn't selected. When you selected, the second country is loaded in the second dropdown so it's most likely just the checkbox that doesn't load the state it has.

Robin481 pushed a commit that referenced this issue Apr 20, 2023
* Upgrade ember to 3.18.0

* Upgrade ember to 3.19.0

* Upgrade ember to 3.20.0

* Upgrade ember to 3.21.0

* Upgrade ember to 3.22.0

* Upgrade ember to 3.23.0

* Remove ember-fetch

* Upgrade ember to 3.24.0

* Upgrade ember-cli-string-helpers

* Upgrade nodejs version to 14.19.0

* Upgrade ember-qunit

* Upgrade ember to 3.28.0, ember-auto-import, ember-bootstrap, ember-source and add qunit

* Upgrade ember to 3.28.6, add custom ember-cli-icon-rating, set bootstrap version to 3 and update ember-bootstrap, ember-basic-dropdown and ember-power-select-with-create

* Upgrade ember-cli-sass to 10.0.1, bootstrap-sass to 3.4.1, ember-moment to 9.0.1 and add node-sass to dependencies

* Upgrade ember-cli-babel to 7.26.11

* Upgrade ember-data to 3.28.13

* Upgrade ember-cli-htmlbars to 5.7.2

* Upgrade rollup to 1.12.0

* Update browser list

* Update ember-modifier, ember-power-select-with-create and add @ember/string

* Update multiple dependencies (@ember/render-modifiers, ember-intl, ember-validated-form, ember-changeset-validations, ember-cli-app-version, ember-collapsible-panel, ember-confirm-dialog, ember-keyboard, ember-notify, ember-simple-auth, ember-toggle)

* Upgrade ember-bootstrap and use bootstrap 4

* Upgrade @ember/optional-features and remove unused config

* Upgrade ember-route-action-helper

* Use qunit for test method and not ember-qunit

* Fix not running frontend tests

* Update yarn.lock and fix dependency alert

* Add qunit setup to ember test helpers

* Add @service annotation for this.store

* Set jquery-integration to false

* Make submit button blue

* Downgrade ember-keyboard to 6.0.4

* Fix jquery bug

* Regenerate yarn.lock file

* Make eslint happy

* Upgrade jquery

* Replace this.$() with $()

* Change ember version in rails.yml

* Add allowed versions to dependency-lint.js

* Upgrade qunit-dom

* Fix testing errors with qunit-dom

* Fix locale error in tests

* Remove import from $ jquery in tests

* Replace jquery with querySelector in person-cv-export-test

* Try fixing test problems with document queryselector

* Replace document with this.element

* Revert document querySelector to assert.dom

* Set locale in new-people-skills-show-test

* Add ember-fetch

* Fix failing tests, remove $.text() and replace this.render with await render

* Replace $ with document.querySelector

* Remove dependency lint error

* Update yarn.lock

* Remove person form tests because they will be new in feature #351

* Add @initiallyOpened={{false}} and @renderInPlace={{true}} to Ember Power Selects

* Fix daterange-edit-tests with this.$ error

* Remove css bug with header menu over drop down

* Remove bug with not possible to delete person

* Remove bug with overlay from people search on person delete

* Fix tests in frontend

* Remove unused eslint disable

* Move button styling to custom.scss

* Adjust readme with specific ember cli version

* Fix tests in frontend

* Resolve bug with setting something on deleted record

* Adjust eslint disabling

* Fix pipeline bug with calling set on destroyed record

* Remove outcommented rootElement = "ember-testing"

* Revert changes in skill-search-test.js

* Implement feedback from pr

* Fix bug with 2 times clicking on new skill in skill set

* Fix pipeline bug with calling set on destroyed record

* Fix failing text

* Remove bug with multiple selection of ui slider

* Fix bug with first point of ui slider always dark blue marked

* Resolve pr review

* Fix bug when editing people skills

* Remove outcommented code

* Fix failing test people skill edit

* Resolve pr feedback

* Fix bug with resetting people skill and broken slider bubbles

* Replace sleep with setTimeout

* Remove bubbles bug when editing all people skills

* Resolve pr feedback
kcinay055679 pushed a commit that referenced this issue Mar 1, 2024
* Upgrade ember to 3.18.0

* Upgrade ember to 3.19.0

* Upgrade ember to 3.20.0

* Upgrade ember to 3.21.0

* Upgrade ember to 3.22.0

* Upgrade ember to 3.23.0

* Remove ember-fetch

* Upgrade ember to 3.24.0

* Upgrade ember-cli-string-helpers

* Upgrade nodejs version to 14.19.0

* Upgrade ember-qunit

* Upgrade ember to 3.28.0, ember-auto-import, ember-bootstrap, ember-source and add qunit

* Upgrade ember to 3.28.6, add custom ember-cli-icon-rating, set bootstrap version to 3 and update ember-bootstrap, ember-basic-dropdown and ember-power-select-with-create

* Upgrade ember-cli-sass to 10.0.1, bootstrap-sass to 3.4.1, ember-moment to 9.0.1 and add node-sass to dependencies

* Upgrade ember-cli-babel to 7.26.11

* Upgrade ember-data to 3.28.13

* Upgrade ember-cli-htmlbars to 5.7.2

* Upgrade rollup to 1.12.0

* Update browser list

* Update ember-modifier, ember-power-select-with-create and add @ember/string

* Update multiple dependencies (@ember/render-modifiers, ember-intl, ember-validated-form, ember-changeset-validations, ember-cli-app-version, ember-collapsible-panel, ember-confirm-dialog, ember-keyboard, ember-notify, ember-simple-auth, ember-toggle)

* Upgrade ember-bootstrap and use bootstrap 4

* Upgrade @ember/optional-features and remove unused config

* Upgrade ember-route-action-helper

* Use qunit for test method and not ember-qunit

* Fix not running frontend tests

* Update yarn.lock and fix dependency alert

* Add qunit setup to ember test helpers

* Add @service annotation for this.store

* Set jquery-integration to false

* Make submit button blue

* Downgrade ember-keyboard to 6.0.4

* Fix jquery bug

* Regenerate yarn.lock file

* Make eslint happy

* Upgrade jquery

* Replace this.$() with $()

* Change ember version in rails.yml

* Add allowed versions to dependency-lint.js

* Upgrade qunit-dom

* Fix testing errors with qunit-dom

* Fix locale error in tests

* Remove import from $ jquery in tests

* Replace jquery with querySelector in person-cv-export-test

* Try fixing test problems with document queryselector

* Replace document with this.element

* Revert document querySelector to assert.dom

* Set locale in new-people-skills-show-test

* Add ember-fetch

* Fix failing tests, remove $.text() and replace this.render with await render

* Replace $ with document.querySelector

* Remove dependency lint error

* Update yarn.lock

* Remove person form tests because they will be new in feature #351

* Add @initiallyOpened={{false}} and @renderInPlace={{true}} to Ember Power Selects

* Fix daterange-edit-tests with this.$ error

* Remove css bug with header menu over drop down

* Remove bug with not possible to delete person

* Remove bug with overlay from people search on person delete

* Fix tests in frontend

* Remove unused eslint disable

* Move button styling to custom.scss

* Adjust readme with specific ember cli version

* Fix tests in frontend

* Resolve bug with setting something on deleted record

* Adjust eslint disabling

* Fix pipeline bug with calling set on destroyed record

* Remove outcommented rootElement = "ember-testing"

* Revert changes in skill-search-test.js

* Implement feedback from pr

* Fix bug with 2 times clicking on new skill in skill set

* Fix pipeline bug with calling set on destroyed record

* Fix failing text

* Remove bug with multiple selection of ui slider

* Fix bug with first point of ui slider always dark blue marked

* Resolve pr review

* Fix bug when editing people skills

* Remove outcommented code

* Fix failing test people skill edit

* Resolve pr feedback

* Fix bug with resetting people skill and broken slider bubbles

* Replace sleep with setTimeout

* Remove bubbles bug when editing all people skills

* Resolve pr feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan needs to be planned
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants