Skip to content

add ServiceCard component#200

Merged
fhlavac merged 24 commits into
mainfrom
add-servicecard
Aug 1, 2024
Merged

add ServiceCard component#200
fhlavac merged 24 commits into
mainfrom
add-servicecard

Conversation

@InsaneZein

@InsaneZein InsaneZein commented Jul 18, 2024

Copy link
Copy Markdown
Collaborator

RHCLOUD-31482 Adds Service Card component

image

@patternfly-build

patternfly-build commented Jul 18, 2024

Copy link
Copy Markdown

@InsaneZein InsaneZein marked this pull request as ready for review July 24, 2024 20:06
@InsaneZein InsaneZein requested review from dlabaj and fhlavac July 30, 2024 18:52
Comment on lines +14 to +28
A **Service Card** component allows

## Examples

### Service Card

```js file="./ServiceCardExample.tsx"

```

### Service Card with Gallery example

```js file="./ServiceCardGalleryExample.tsx"

```

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.

@InsaneZein can you please add some texts to the docs? It would also be nice to create an example with the custom footer. Let me know if you need help with the texts.

description='This is a basic ServiceCard Example'
icon={<img src={contentHeaderIcon} alt="content-header-icon" />}
showDisabledButton={false}
helperText=''

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.

I would either provide some text or remove the prop from this example


const useStyles = createUseStyles({
card: {
height: ('var(--pf-v5-u-h-100)')

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.

Suggested change
height: ('var(--pf-v5-u-h-100)')
height: 'var(--pf-v5-u-h-100)'

height: ('var(--pf-v5-u-h-100)')
},
image: {
marginRight: ('var(--pf-v5-global--spacer--md)'),

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.

Suggested change
marginRight: ('var(--pf-v5-global--spacer--md)'),
marginRight: 'var(--pf-v5-global--spacer--md)',

width: 48
},
launchButton: {
marginRight: ('var(--pf-v5-global--spacer--sm)')

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.

Suggested change
marginRight: ('var(--pf-v5-global--spacer--sm)')
marginRight: 'var(--pf-v5-global--spacer--md)'

I think this one should be md

@fhlavac fhlavac Jul 31, 2024

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.

Can you please add icons to these cards and show a helper text in one of the cards? Just to show the features.

For the footers we could hardcode the default one in the example and another with something like this

<Button variant="link" isInline>
            Learn more  
          <Icon className="pf-u-ml-sm" isInline>
            <ArrowRightIcon />
          </Icon>
</Button>

(another already known use case of this component)

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.

We should preferably use cypress

Comment thread packages/module/src/ServiceCard/ServiceCard.tsx
Comment thread packages/module/src/ServiceCard/ServiceCard.tsx
@fhlavac

fhlavac commented Jul 31, 2024

Copy link
Copy Markdown
Contributor

@InsaneZein thank you! Overall looks good. Just some minor comments

fhlavac added a commit to fhlavac/react-component-groups that referenced this pull request Aug 20, 2024
* add ServiceCard component (patternfly#200)

* fix(readme): Update README.md (patternfly#257)

* chore(deps-dev): bump @babel/preset-env from 7.24.8 to 7.25.3 (patternfly#254)

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.24.8 to 7.25.3.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.25.3/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump eslint from 8.41.0 to 8.57.0 (patternfly#253)

Bumps [eslint](https://github.com/eslint/eslint) from 8.41.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.41.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump readable-stream from 1.0.34 to 2.3.8 (patternfly#251)

Bumps [readable-stream](https://github.com/nodejs/readable-stream) from 1.0.34 to 2.3.8.
- [Release notes](https://github.com/nodejs/readable-stream/releases)
- [Commits](nodejs/readable-stream@v1.0.34...v2.3.8)

---
updated-dependencies:
- dependency-name: readable-stream
  dependency-type: indirect
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump sax from 1.2.4 to 1.4.1 (patternfly#250)

Bumps [sax](https://github.com/isaacs/sax-js) from 1.2.4 to 1.4.1.
- [Commits](isaacs/sax-js@v1.2.4...v1.4.1)

---
updated-dependencies:
- dependency-name: sax
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump fast-glob from 3.2.12 to 3.3.2 (patternfly#249)

Bumps [fast-glob](https://github.com/mrmlnc/fast-glob) from 3.2.12 to 3.3.2.
- [Release notes](https://github.com/mrmlnc/fast-glob/releases)
- [Commits](mrmlnc/fast-glob@3.2.12...3.3.2)

---
updated-dependencies:
- dependency-name: fast-glob
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @jridgewell/sourcemap-codec from 1.4.15 to 1.5.0 (patternfly#248)

Bumps [@jridgewell/sourcemap-codec](https://github.com/jridgewell/sourcemap-codec) from 1.4.15 to 1.5.0.
- [Release notes](https://github.com/jridgewell/sourcemap-codec/releases)
- [Changelog](https://github.com/jridgewell/sourcemap-codec/blob/main/CHANGELOG.md)
- [Commits](jridgewell/sourcemap-codec@v1.4.15...v1.5.0)

---
updated-dependencies:
- dependency-name: "@jridgewell/sourcemap-codec"
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump launch-editor from 2.8.0 to 2.8.1 (patternfly#247)

Bumps [launch-editor](https://github.com/yyx990803/launch-editor) from 2.8.0 to 2.8.1.
- [Commits](vitejs/launch-editor@v2.8.0...v2.8.1)

---
updated-dependencies:
- dependency-name: launch-editor
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/eslint-scope from 3.7.4 to 3.7.7 (patternfly#246)

Bumps [@types/eslint-scope](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/eslint-scope) from 3.7.4 to 3.7.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/eslint-scope)

---
updated-dependencies:
- dependency-name: "@types/eslint-scope"
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update to PatternFly 6 (patternfly#145)

* Update to the latest PF versions (patternfly#224)

* Update PF dependencies

* Fix MCC colors

* Replace not existing PF Text components

* Update snapshots

* fix(v6): Fix generated files

* fix(v6): Fix TagCount styling (patternfly#237)

* fix(v6): Fix TagCount styling

* Update tokens

* Update snapshots

* fix(pf6): Update generated files

* Remove extra padding

* Remove unused import

* Update README.md

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: InsaneZein <zsleiman@redhat.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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