Skip to content

Fixes #38978 - Add @patternfly/react-templates - #10811

Merged
adamruzicka merged 1 commit into
theforeman:developfrom
MariaAga:react-templates
Jan 16, 2026
Merged

Fixes #38978 - Add @patternfly/react-templates#10811
adamruzicka merged 1 commit into
theforeman:developfrom
MariaAga:react-templates

Conversation

@MariaAga

@MariaAga MariaAga commented Jan 7, 2026

Copy link
Copy Markdown
Member

Updated the required PF5 version to include a version that supports react-templates and is the latest.
"This package provides wrapped Patternfly component demos with a streamlined API for ease of use."
I want to add it so we can use a simple version of Select (and other components) instead of creating our own wrappers

With the package:

      const Options: SimpleSelectOption[] = [
        { content: 'Option 1', value: 'Option1' },
        { content: 'Option 2', value: 'Option2', description: 'Option with description' },
        { content: 'Option 3', value: 'Option3' }
      ];
      <SimpleSelect
        initialOptions={ Options.map((o) => ({ ...o, selected: o.value === selected }))}
        isDisabled={isDisabled}
        onSelect={(_ev, selection) => setSelected(String(selection))}
      />

Without (need to specify a full toggle components and more):

        <Select
        id="single-select"
        isOpen={isOpen}
        selected={selected}
        onSelect={onSelect}
        onOpenChange={(isOpen) => setIsOpen(isOpen)}
        toggle={
          <MenuToggle
            ref={toggleRef}
            onClick={onToggleClick}
            isExpanded={isOpen}
            isDisabled={isDisabled}
            style={
              {
                width: "200px",
              } as React.CSSProperties
            }
          >
            {selected}
          </MenuToggle>
        }
        shouldFocusToggleOnSelect
      >
        <SelectList>
          <SelectOption value="Option 1">Option 1</SelectOption>
          <SelectOption value="Option 2">Option 2</SelectOption>
          <SelectOption value="Option 3">Option 3</SelectOption>
        </SelectList>
      </Select>
  );

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds the @patternfly/react-templates package (version ^1.1.8) to simplify the usage of PatternFly components by providing wrapped components with streamlined APIs. The PR also updates all PatternFly React packages from version ^5.2.0 to versions in the 5.4.x range to ensure compatibility with react-templates.

Key Changes:

  • Added @patternfly/react-templates dependency to provide simplified component wrappers
  • Updated PatternFly React packages from v5.2.x to v5.4.x for compatibility and to get latest features

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
"@patternfly/react-table": "^5.2.0",
"@patternfly/react-tokens": "^5.2.0",
"@patternfly/react-core": "^5.4.8",
"@patternfly/react-icons": "^5.4.2",

Copilot AI Jan 7, 2026

Copy link

Choose a reason for hiding this comment

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

The version ^5.4.2 is specified for @patternfly/react-icons, but @patternfly/react-core and @patternfly/react-table are using ^5.4.8. To ensure consistency and compatibility across PatternFly packages, consider updating this to ^5.4.8 to match the other react packages.

Suggested change
"@patternfly/react-icons": "^5.4.2",
"@patternfly/react-icons": "^5.4.8",

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Latest version is @patternfly/react-icons: 5.4.2

@ogajduse

Copy link
Copy Markdown
Member

I see the packaging group being requested to review the PR. Strange to ask this way, but what do packagers usually review in this kind of update in the theforeman/foreman project itself?

@MariaAga

Copy link
Copy Markdown
Member Author

" The idea is that the packaging team will be added to any changes to dependencies.
This should allow us to make the packaging changes needed keeping
nightlies working."
So I assume its to make sure I'm not adding bad packages and that there is a packaging PR matching the changes here?

@ogajduse

Copy link
Copy Markdown
Member

" The idea is that the packaging team will be added to any changes to dependencies. This should allow us to make the packaging changes needed keeping nightlies working." So I assume its to make sure I'm not adding bad packages and that there is a packaging PR matching the changes here?

That matches how I view it. Then it is ACK on behalf of packaging.

@adamruzicka adamruzicka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Packit fails due to a dependency not being available, but that is expected until theforeman/foreman-packaging#12902 goes in.

All the bumped versions are already present in rpm/develop at the required (or higher) versions.

@adamruzicka
adamruzicka merged commit 535de14 into theforeman:develop Jan 16, 2026
70 of 73 checks passed
@adamruzicka

Copy link
Copy Markdown
Contributor

Thank you @MariaAga !

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.

4 participants