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

Note Details redesign #1752

Merged
merged 49 commits into from
Apr 4, 2023
Merged

Note Details redesign #1752

merged 49 commits into from
Apr 4, 2023

Conversation

TheSlimvReal
Copy link
Collaborator

@TheSlimvReal TheSlimvReal commented Mar 1, 2023

see issue: #1083

Based on #1793 so review and merge this first.

Visible/Frontend Changes

  • enum dropdown component is used
  • More responsive design

Architectural/Backend Changes

  • Note details uses same form setup as other components that edit entities
  • Refactor ChildMeetingNoteAttendance to also work with the form setup (maybe this can become a individual datatype rather than a combination of children and childrenAttendance

@github-actions
Copy link

github-actions bot commented Mar 1, 2023

Deployed to https://pr-1752.aam-digital.net/

@TheSlimvReal TheSlimvReal changed the base branch from master to dynamic_component_input March 22, 2023 15:04
@TheSlimvReal TheSlimvReal marked this pull request as ready for review March 23, 2023 14:49
@TheSlimvReal TheSlimvReal mentioned this pull request Mar 23, 2023
1 task
@TheSlimvReal TheSlimvReal force-pushed the dynamic_component_input branch from afa0f78 to 116b0f3 Compare March 27, 2023 07:10
Base automatically changed from dynamic_component_input to master March 30, 2023 17:28
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

code looks good 👍
I'll test UX and functional properly in the last PR

@@ -302,7 +301,7 @@ export class Entity {
*/
public copy(generateNewId: boolean = false): this {
const other = new (this.getConstructor())(this._id);
Object.assign(other, cloneDeep(this));
Object.assign(other, this);
Copy link
Member

Choose a reason for hiding this comment

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

I think we added the deep clone for a reason to make sure references/arrays are not reused?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a problem with that approach.
When we do a deep copy, we might make a "too deep" copy: E.g. the configurable enum values cannot be matched anymore because in the basic autocomplete component we use object equality but due to the deep copy this does not work anymore.
So I suggest that instead the subclasses take care of creating a proper copy that is as deep as it needs to be (this is anyway what we are already doing).

Copy link
Member

Choose a reason for hiding this comment

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

Sounds slightly risky to rely on the sub-classes to remember this, but I understand the point.

Isn't this impossible to cover config-defined array properties then?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point but then we have a slightly bigger topic to cover, I moved this to #1805

src/app/core/config/config-fix.ts Outdated Show resolved Hide resolved
TheSlimvReal and others added 12 commits April 3, 2023 14:53
# Conflicts:
#	src/app/child-dev-project/attendance/activity-attendance-section/activity-attendance-section.component.ts
#	src/app/child-dev-project/attendance/attendance-details/attendance-details.component.html
#	src/app/child-dev-project/attendance/attendance-details/attendance-details.component.ts
#	src/app/child-dev-project/children/child-block/child-block.component.ts
#	src/app/child-dev-project/children/child-details/grouped-child-attendance/grouped-child-attendance.component.ts
#	src/app/child-dev-project/children/children-list/bmi-block/bmi-block.component.spec.ts
#	src/app/child-dev-project/children/children-list/bmi-block/bmi-block.component.ts
#	src/app/child-dev-project/children/children-list/recent-attendance-blocks/recent-attendance-blocks.component.spec.ts
#	src/app/child-dev-project/children/children-list/recent-attendance-blocks/recent-attendance-blocks.component.ts
#	src/app/child-dev-project/children/dashboard-widgets/entity-count-dashboard/entity-count-dashboard.component.ts
#	src/app/child-dev-project/notes/notes-related-to-entity/notes-related-to-entity.component.ts
#	src/app/child-dev-project/schools/activities-overview/activities-overview.component.ts
#	src/app/child-dev-project/schools/child-school-overview/child-school-overview.component.spec.ts
#	src/app/child-dev-project/schools/child-school-overview/child-school-overview.component.ts
#	src/app/core/entity-components/entity-details/form/form.component.spec.ts
#	src/app/core/entity-components/entity-details/form/form.component.ts
#	src/app/core/entity-components/entity-details/related-entities/related-entities.component.spec.ts
#	src/app/core/entity-components/entity-details/related-entities/related-entities.component.ts
#	src/app/core/entity-components/entity-select/edit-entity-array/edit-entity-array.component.ts
#	src/app/core/entity-components/entity-utils/view-components/display-date/display-date.component.ts
#	src/app/core/form-dialog/form-dialog.service.spec.ts
#	src/app/core/form-dialog/form-dialog.service.ts
#	src/app/features/matching-entities/matching-entities/matching-entities.component.spec.ts
#	src/app/features/matching-entities/matching-entities/matching-entities.component.ts
#	src/app/features/todos/todos-related-to-entity/todos-related-to-entity.component.ts
and improve its layout
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

pushed some small bug fixes and UI improvements. From my review and testing this looks good to go now! :-)

Co-authored-by: Sebastian <sebastian.leidig@gmail.com>
@sonarcloud
Copy link

sonarcloud bot commented Apr 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug C 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@TheSlimvReal TheSlimvReal merged commit 9585bfd into master Apr 4, 2023
@TheSlimvReal TheSlimvReal deleted the note_redesign branch April 4, 2023 17:28
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.20.0-master.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.20.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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