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

Basic Setup Wizard / Admin UI #2057

Merged
merged 155 commits into from
Dec 13, 2023
Merged

Basic Setup Wizard / Admin UI #2057

merged 155 commits into from
Dec 13, 2023

Conversation

sleidig
Copy link
Member

@sleidig sleidig commented Oct 30, 2023

see #1947, #2047 , #2048

Remaining bugs & issues:

  • field details are not reflected in the drag&drop preview anymore (since introducing entity-field-edit.component)
  • entity schema is edited in-place, changes cannot be canceled yet
  • snackbar + undo action when saving
  • preview and manage enum options of selected enum (+ labels for enum entities?) + move [new option set] out of text box
  • rename routes and components -> AdminXComponent? and create folder structure following the same pattern; move AdminFormC into module next to FormC (out of Admin Module?)
  • prevent change of dataType to something that can't auto-transform existing data - or make datatype transformation more fault tolerant? (--> date, entity, location)
  • implement UpdateMetadata and EventAttendance as datatypes based on SchemaEmbedDatatype
  • add permission and hide button from users by default

Problems:

  • schema edited in-place -> logic for cancel needed
  • schema change in one tab not reflected in other tabs
  • save only string ids in form + details in schema wherever possible

Form Designer

  • reorder form fields via drag&drop
  • create new field groups via drag&drop
  • edit/create group titles
  • add new form field (and with that the corresponding entity attribute) via drag&drop
  • hide/deactivate existing form fields via drag&drop
  • fine tune UX of drag & drop (visualization, seamless drop, ...)
  • save the updated view config
  • offer all entity fields to be picked from "hidden fields" sidebar

Field Details

  • edit form field details like label, etc.
  • select an entity type for entity/entity-array dataType
  • translate the dataType names to less technical, easy-to-understand labels
  • save return the updated entity config to be saved
  • creating a new field, the Field ID is auto-generated (but editable)
  • select/create an configurable-enum list for the dataType

Later (?):

Config & Architecture discussions

  • EntitySchemaField_withId + flatten EntityConfig.attributes
  • - form field groups: { header?: string; fields: FormFieldConfig[]; }
  • - where to extend/merge schema + form field configs (top or bottom layer)?

@github-actions
Copy link

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

@sleidig sleidig changed the title Setup Wizard / Admin UI Basic Setup Wizard / Admin UI Nov 2, 2023
brajesh-lab and others added 16 commits November 6, 2023 16:25
#2033)

closes #1918

---------
Co-authored-by: Sebastian Leidig <sebastian@aam-digital.com>
closes #1361

Co-authored-by: Sebastian Leidig <sebastian@aam-digital.com>
closes #1362

Co-authored-by: Sebastian <sebastian@aam-digital.com>
all prettier rules are enforced by lint check now

---------

Co-authored-by: Sebastian Leidig <sebastian@aam-digital.com>
# Conflicts:
#	src/app/child-dev-project/attendance/add-day-attendance/add-day-attendance.component.ts
#	src/app/core/entity-details/entity-details/entity-details.component.html
#	src/app/core/entity-details/entity-details/entity-details.component.ts
#	src/app/core/ui/routed-view/routed-view.component.ts
@TheSlimvReal
Copy link
Collaborator

TheSlimvReal commented Nov 10, 2023

This look and feel is really amazing. I love how intuitive and pretty the design is. It works just the way I would expect it. Really good job!

  • When creating a new field, the Field ID is not readonly
  • When a field currently has type details (e.g. entity) and you edit it to something without type details (e.g. text) then the first time you change it, it cannot be saved. Once it is changed again (e.g. to number) it works. Probably the Type Details field is still required in the background but just not visible.
  • Is it necessary to have the toggle for the short label? We could also just make it optional with a hint that the normal label will be used if not set.

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.

I think the opton to add permissions to admin routes is quite important. I don't think this is possible with the new system. Or should we have a default rule for that?

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.

Looks good now. Please have a look at the accidental changes to some comments.

src/app/app-initializers.ts Outdated Show resolved Hide resolved
src/app/core/demo-data/demo-data-generator.ts Show resolved Hide resolved
src/app/core/demo-data/demo-data.service.ts Outdated Show resolved Hide resolved
src/app/core/demo-data/demo-data.service.ts Outdated Show resolved Hide resolved
src/app/utils/mocked-testing.module.ts Outdated Show resolved Hide resolved
src/app/utils/utils.ts Outdated Show resolved Hide resolved
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.

I tested it now with the route guard and it works well. There is only a error message in synced mode when visiting admin/entity/Child/details directly as I think the component is loaded before the config is available. When waiting for the config (using await firstValueFrom(this.configService.configUpdates) the error is gone but it somehow navigates to a empty tab. I wasnt able to fix that.

# Conflicts:
#	src/app/core/config/config-fix.ts
#	src/app/core/config/dynamic-routing/router.service.ts
#	src/app/core/entity-details/entity-details/entity-details.component.spec.ts
#	src/app/core/permissions/permission-guard/entity-permission.guard.spec.ts
#	src/app/core/permissions/permission-guard/entity-permission.guard.ts
@sleidig sleidig merged commit 3b4168b into master Dec 13, 2023
6 of 7 checks passed
@sleidig sleidig deleted the setup-field-config branch December 13, 2023 15:51
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.28.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 Dec 13, 2023
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.28.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 10, 2024
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
None yet
Development

Successfully merging this pull request may close these issues.

5 participants