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

Refactoring: entities-table / entity-subrecord #2142

Merged
merged 46 commits into from
Jan 15, 2024
Merged

Conversation

sleidig
Copy link
Member

@sleidig sleidig commented Dec 21, 2023

Open TODOs

  • fix remaining tests
  • sort overwrite (e.g. TodoListComponent) doesn't work
  • trying to inline-edit a note (e.g. in child details) always opens the popup
  • when clicking on a from field saving after inline editing does not reset the unsaved changes state (UnsavedChangesService) so the app still thinks there are unsaved changes
  • Editing and saving in a popup (note details or row details) does not update the value in the table after closed --> (I couldn't reproduce this, @TheSlimvReal )
  • Readonly function is not shown in popup (e.g. health check BMI)
  • More properties are shown in popup (e.g. health check also shows child id form) --> reimplement hideFromTable / hideFromForm

potential further refactoring

Copy link

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

@sleidig sleidig marked this pull request as ready for review January 2, 2024 15:30
showEntity(entity: T) {
switch (this.clickMode) {
case "popup":
this.formDialog.openFormPopup(entity, this.columnsToDisplay); // TODO this.formDialog.openFormPopup(entity, this._columns)
Copy link
Member Author

Choose a reason for hiding this comment

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

we do not correctly support the following flags yet:

  • hideFromTable?: boolean;
  • hideFromForm?: boolean;
  • forTable?: boolean;

Copy link
Member Author

Choose a reason for hiding this comment

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

--> discuss: where + how do we need these concepts; let's try to simplify and clearly specify this before re-adding the logic.

(e.g. todos-related-to-entity use the process)

Copy link
Member Author

Choose a reason for hiding this comment

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

we discussed to move towards a different config structure in the future:

  • config for list columns
  • config for details fields (popup or fullscreen) separately
  • config for entity, including custom (run-time calculated) field configs

image

Might only refactor things towards this at a later point, however.

Copy link
Collaborator

@TheSlimvReal TheSlimvReal left a comment

Choose a reason for hiding this comment

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

Really good refactoring. Most comments are quite minor.

On functionality testing I discovered some bugs:

  • trying to inline-edit a note (e.g. in child details) always opens the popup when clicking on a from field
  • saving after inline editing does not reset the unsaved changes state (UnsavedChangesService) so the app still thinks there are unsaved changes
  • Editing and saving in a popup (note details or row details) does not update the value in the table after closed
  • Readonly function is not shown in popup (e.g. health check BMI)
  • More properties are shown in popup (e.g. health check also shows child id form)

@sleidig sleidig requested a review from TheSlimvReal January 10, 2024 15:15
Copy link
Collaborator

@TheSlimvReal TheSlimvReal left a comment

Choose a reason for hiding this comment

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

Seems to all work well now. There are just two more minor things I discovered.

  • Inline editing "cancel" does not correctly reset unsavedChanges state
  • The Task list does by default not show the archived tasks anymore. This results in the weird behavior that when activating the "completed" filter no tasks are shown until the "include archived" is also activated. This is probably something that most users will not figure out.

@sleidig sleidig changed the base branch from master to fix-related-entities January 12, 2024 09:54
# Conflicts:
#	src/app/core/entity-details/related-entities/related-entities.component.spec.ts
#	src/app/core/entity-details/related-entities/related-entities.component.ts
Base automatically changed from fix-related-entities to master January 12, 2024 13:29
# Conflicts:
#	src/app/core/entity-details/related-entities/related-entities.component.spec.ts
#	src/app/core/entity-details/related-entities/related-entities.component.ts
Copy link
Collaborator

@TheSlimvReal TheSlimvReal left a comment

Choose a reason for hiding this comment

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

Great, thanks for also implementing the sorting automation.

@TheSlimvReal TheSlimvReal merged commit 9867c88 into master Jan 15, 2024
5 of 7 checks passed
@TheSlimvReal TheSlimvReal deleted the admin-list branch January 15, 2024 11:52
@aam-digital-ci
Copy link
Collaborator

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

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released on @master managed by CI (semantic-release) label Jan 15, 2024
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.29.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.29.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released managed by CI (semantic-release) label Jan 17, 2024
sleidig added a commit that referenced this pull request Jan 22, 2024
Co-authored-by: Simon <simon@aam-digital.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @master managed by CI (semantic-release) released managed by CI (semantic-release)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants