Skip to content

[doc] Theme generator Preview (Step 2)#2417

Open
Mil4n0r wants to merge 22 commits intotheme-generatorfrom
Mil4n0r/theme-generator-preview
Open

[doc] Theme generator Preview (Step 2)#2417
Mil4n0r wants to merge 22 commits intotheme-generatorfrom
Mil4n0r/theme-generator-preview

Conversation

@Mil4n0r
Copy link
Collaborator

@Mil4n0r Mil4n0r commented Mar 2, 2026

Checklist
(Check off all the items before submitting)

  • Build process is done without errors. All tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Added step 2 for theme generator config.

Still need to address the issue with the layout for having scroll inside the preview area. The rest can be reviewed.

Merge step 1 first if possible.

@raquelarrojo raquelarrojo requested review from raquelarrojo and removed request for raquelarrojo March 3, 2026 08:05
@Mil4n0r Mil4n0r marked this pull request as ready for review March 5, 2026 15:11
@Mil4n0r Mil4n0r requested a review from raquelarrojo March 5, 2026 15:48
import { useMemo, useState } from "react";
import componentsList from "../common/componentsList.json";
import { componentsRegistry, examplesRegistry } from "screens/utilities/theme-generator/componentsRegistry";
import { ListOptionType } from "../../../../packages/lib/src/select/types";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be imported from @dxc-technology/halstack-react ? instead of this cross-package import?.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We don't currently export types. (We should ideally use something like DefinitelyTyped). For now I can simply repeat the typing in this file, is it okay?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I think I prefer this option, although we must be aware that if it changes in one place, we have to change it here too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Application and dashboard examples should render the header and footer. If they do not, I think it is not possible to preview the logos, for example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Login example doesn't make much sense as a standalone preview in this context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed! (Removed)

Copy link
Collaborator

Choose a reason for hiding this comment

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

The example has been removed, which is OK, but it also needs to be removed from the selectable list.
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed!

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we include a disclaimer with these examples, explaining that they are just suggestions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure, we could discuss with design how we could show that.

Copy link
Collaborator

@raquelarrojo raquelarrojo left a comment

Choose a reason for hiding this comment

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

I would add some real context to the previews. Avoid "Label", "Sublabel", First step", "Second step" and give real values.

{mode === "components" && (
<DxcSelect
placeholder="Select components"
options={componentOptions}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this select be medium size? Seems to be larger than in design.
I would add searchable functionality to the select to make it easier the selection.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is already medium size (it's the default one).

You are right on the searchable, I would note to improve the search functionality for group selectors to be included as indexes to filter (currently, if we search "Feedback", no results will be shown). This was already done for Sidenav so we could probably reuse some of the logic, not high priority by any means though, just note it as a low prio issue if possible.

Fixed!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I mean if it should be small size. It seems larger in implementation than in the design.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right sorry! I was only checking height which does not change between sizes.

Fixed!

/>
</DxcFlex>
<CustomPreviewArea>{displayedPreview}</CustomPreviewArea>
</DxcFlex>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we could add the Component name as a title above each preview. We can confirm with design but I thinks it would be helpful

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pending confirmation from design.

@Mil4n0r Mil4n0r changed the title Theme generator Preview (Step 2) [doc] Theme generator Preview (Step 2) Mar 6, 2026
@Mil4n0r
Copy link
Collaborator Author

Mil4n0r commented Mar 6, 2026

The required changes to HalstackProvider for inline styles will be added in #2421 instead of this one to prevent changes outside doc.

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