Skip to content

Display editable template options to convert to for each page#20

Open
mickleroy wants to merge 1 commit intoadobe:developfrom
mickleroy:feature/choose-editable-templates
Open

Display editable template options to convert to for each page#20
mickleroy wants to merge 1 commit intoadobe:developfrom
mickleroy:feature/choose-editable-templates

Conversation

@mickleroy
Copy link
Copy Markdown

This is an implementation of the feature request lodged here: #16

With the current tool, when multiple editable template configurations are provided for one classic template, only one is chosen arbitrarily. Instead, the tool can now list the editable template options available and let's the user choose which one should be used.

Example config 1:

staticTemplate=/apps/helloworld/templates/base-page
editableTemplate=/conf/we-retail/settings/wcm/templates/experience-page

Example config 2:

staticTemplate=/apps/helloworld/templates/base-page
editableTemplate=/conf/we-retail/settings/wcm/templates/hero-page

Available Classic pages and corresponding Editable templates:
editable-template-options
Selecting a row hides other options:
editable-template-options2

@mickleroy
Copy link
Copy Markdown
Author

@bstopp could you please take a look at this? Thanks

return pageRules.stream()
.filter(rule -> rule.getStaticTemplate().equals(staticTemplate))
.map(PageStructureRewriteRule::getEditableTemplate)
.collect(Collectors.toSet());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

did you consider orderable set to present results always in the same order?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't think the order is particularly sensitive in this context. Users can always change the ordering of rows using the table controls in the UI.

@bstopp
Copy link
Copy Markdown
Contributor

bstopp commented Jun 5, 2024

Realizing i'm very late to this, this seems useful, But i think that users may get confused by multiple entries in the list. I'd prefer if the Editable Template column was a drop-down in which they could select which should be used.

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