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

VariantContext #848

Merged
merged 81 commits into from
Sep 7, 2023
Merged

Conversation

nielslyngsoe
Copy link
Member

@nielslyngsoe nielslyngsoe commented Aug 27, 2023

Gigant refactor to ensure property editors abilities across implementations(in other words Workspaces).

Mission:

The mission of this refactor is to lose the bond between Workspace and Property.
We have too many specific requirements for Workspaces, which do not apply across the application.

Some workspace has variants, which means different names and property values depending on the variantId.

This will still be the case, but to make the code of property editors simpler, I'm introducing a Dataset Context.

A dataset is a set of properties. for the datatype configuration there is one.. for documents there is one pr. variant.

A dataset will hold a name, properties, variantId, and eventually some publishing/save states.

overall this means the code of a property editor does not need to care about variants when requesting the name or values of other properties.

Also counting for those concerned about saving/publishing state. Those will though have to request with a different Context Token to get such datasetContext.

Notice

with this change workspace-property element does not take a value property. It retrieves it via the variant context. This means that now the variant context is required to have Property Editor UIs working. — But this is sort of on purpose as well. In this way, we have ensured property editors using the variant will work in any scenario.

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

…xt-as-workspace-context

# Conflicts:
#	src/packages/core/components/property-type-based-property/property-type-based-property.element.ts
#	src/packages/core/workspace/workspace-context/workspace-context.ts
#	src/packages/core/workspace/workspace-variant/workspace-variant.context.ts
#	src/packages/dictionary/dictionary/workspace/dictionary-workspace.context.ts
#	src/packages/documents/document-types/workspace/document-type-workspace.context.ts
#	src/packages/documents/documents/workspace/document-workspace-split-view.element.ts
#	src/packages/documents/documents/workspace/document-workspace.context.ts
#	src/packages/media/media-types/workspace/media-type-workspace.context.ts
#	src/packages/media/media/workspace/media-workspace.context.ts
#	src/packages/members/member-groups/workspace/member-group-workspace.context.ts
#	src/packages/members/member-types/workspace/member-type-workspace.context.ts
#	src/packages/members/members/workspace/member-workspace.context.ts
#	src/packages/settings/data-types/workspace/data-type-workspace.context.ts
#	src/packages/settings/languages/workspace/language/language-workspace.context.ts
#	src/packages/settings/relation-types/workspace/relation-type-workspace.context.ts
#	src/packages/templating/partial-views/workspace/partial-view-workspace.context.ts
#	src/packages/templating/stylesheets/workspace/stylesheet-workspace.context.ts
#	src/packages/templating/templates/workspace/template-workspace.context.ts
#	src/packages/users/user-groups/workspace/user-group-workspace.context.ts
#	src/packages/users/users/workspace/user-workspace.context.ts
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@nielslyngsoe nielslyngsoe changed the title DatasetContext VariantContext Sep 5, 2023
@nielslyngsoe nielslyngsoe marked this pull request as ready for review September 5, 2023 09:28
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

2 similar comments
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@umbraco umbraco deleted a comment from madsrasmussen Sep 6, 2023
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@nielslyngsoe
Copy link
Member Author

@madsrasmussen
All comments are corrected. We do need to revisit the property editor config element later, to make it work independently so everyone can spin up a property editor UI configuration editor. I have added a TODO in code.

…xt-as-workspace-context

# Conflicts:
#	src/packages/core/components/variant-selector/variant-selector.element.ts
#	src/packages/core/workspace/workspace-split-view/workspace-split-view.element.ts
#	src/packages/core/workspace/workspace-variant/variantable-property/variantable-property.element.ts
#	src/packages/templating/stylesheets/workspace/stylesheet-workspace.context.ts
@github-actions
Copy link

github-actions bot commented Sep 7, 2023

Azure Static Web Apps: Your stage site is ready! Visit it here: https://ambitious-stone-0033b3603-848.westeurope.1.azurestaticapps.net

@nielslyngsoe nielslyngsoe merged commit 88da744 into main Sep 7, 2023
6 checks passed
@nielslyngsoe nielslyngsoe deleted the feature/variant-context-as-workspace-context branch September 7, 2023 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants