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

Content block: Automatically define slot attribute for the copy component #4851

Closed
asudoh opened this issue Jan 8, 2021 · 0 comments
Closed
Assignees
Labels
dev Needs some dev work package: web components Work necessary for the IBM.com Library web components package severity 2 Affects major functionality, has a workaround
Milestone

Comments

@asudoh
Copy link
Contributor

asudoh commented Jan 8, 2021

The problem

<dds-content-block-copy> requires explicitly specifying slot attribute, though the slot is copy for all use cases.

The solution

Define slot="copy" by default. Or make <slot name="copy"> in component <dds-content-block-copy> is used with the default slot (Ref: #4627)

@asudoh asudoh added the dev Needs some dev work label Jan 8, 2021
@RobertaJHahn RobertaJHahn added package: web components Work necessary for the IBM.com Library web components package severity 2 Affects major functionality, has a workaround labels Jan 11, 2021
@RobertaJHahn RobertaJHahn added this to the Sprint 21-01 milestone Jan 11, 2021
asudoh added a commit to asudoh/ibm-dotcom-library that referenced this issue Jan 12, 2021
Unifies the slot name strategy, using the default slot for child
contents, and `copy` slot for copy contents, for `<dds-content-block>`,
`<dds-content-group>` and their descendants.

Such unification allows us to reduce the overrides, especially for slot
names and layout, in the descendants on top of the ancestor components.

`<dds-content-block-copy>` now sets `copy` slot automatically.
`<dds-content-block-headlines-item>` no longer sets the slot.

Also:

* Ensures that `<div>`s surrounding copy, media, etc. contents won't be
  rendered unless the corresponding contents are there.
* Introduces `size="sm"` option to `<dds-content-block-copy>`, so we
  can use it instead of `<dds-content-item-copy>` in
  `<dds-content-block>`, `<dds-content-group>` and their descendants.
* Introduces `<dds-content-group-copy>` so we can apply styling
  specific to content group.

Refs carbon-design-system#4627.
Refs carbon-design-system#4851.
kodiakhq bot pushed a commit that referenced this issue Jan 13, 2021
### Related Ticket(s)

Refs #4627.
Refs #4851.

### Description

Unifies the slot name strategy, using the default slot for child contents, and `copy` slot for copy contents, for `<dds-content-block>`, `<dds-content-group>` and their descendants.

Such unification allows us to reduce the overrides, especially for slot names and layout, in the descendants on top of the ancestor components.

`<dds-content-block-copy>` now sets `copy` slot automatically. `<dds-content-block-headlines-item>` no longer sets the slot.

Also:

* Ensures that `<div>`s surrounding copy, media, etc. contents won't be rendered unless the corresponding contents are there.
* Introduces `size="sm"` option to `<dds-content-block-copy>`, so we can use it instead of `<dds-content-item-copy>` in
  `<dds-content-block>`, `<dds-content-group>` and their descendants.
* Introduces `<dds-content-group-copy>` so we can apply styling specific to content group.

### Changelog

**New**

- `size="sm"` option to `<dds-content-block-copy>`.
- `<dds-content-group-copy>`, the copy content of content group.

**Changed**

- Changes to unify the slot name strategy, using the default slot for child contents, and `copy` slot for copy contents, for `<dds-content-block>`, `<dds-content-group>` and their descendants.
- `<dds-content-block-copy>` to set `copy` slot automatically
- `<dds-content-block-headlines-item>` to no longer set the slot.
- Changes to ensure that `<div>`s surrounding copy, media, etc. contents won't be rendered unless the corresponding contents are there.
IgnacioBecerra pushed a commit to IgnacioBecerra/ibm-dotcom-library that referenced this issue Feb 22, 2021
### Related Ticket(s)

Refs carbon-design-system#4627.
Refs carbon-design-system#4851.

### Description

Unifies the slot name strategy, using the default slot for child contents, and `copy` slot for copy contents, for `<dds-content-block>`, `<dds-content-group>` and their descendants.

Such unification allows us to reduce the overrides, especially for slot names and layout, in the descendants on top of the ancestor components.

`<dds-content-block-copy>` now sets `copy` slot automatically. `<dds-content-block-headlines-item>` no longer sets the slot.

Also:

* Ensures that `<div>`s surrounding copy, media, etc. contents won't be rendered unless the corresponding contents are there.
* Introduces `size="sm"` option to `<dds-content-block-copy>`, so we can use it instead of `<dds-content-item-copy>` in
  `<dds-content-block>`, `<dds-content-group>` and their descendants.
* Introduces `<dds-content-group-copy>` so we can apply styling specific to content group.

### Changelog

**New**

- `size="sm"` option to `<dds-content-block-copy>`.
- `<dds-content-group-copy>`, the copy content of content group.

**Changed**

- Changes to unify the slot name strategy, using the default slot for child contents, and `copy` slot for copy contents, for `<dds-content-block>`, `<dds-content-group>` and their descendants.
- `<dds-content-block-copy>` to set `copy` slot automatically
- `<dds-content-block-headlines-item>` to no longer set the slot.
- Changes to ensure that `<div>`s surrounding copy, media, etc. contents won't be rendered unless the corresponding contents are there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Needs some dev work package: web components Work necessary for the IBM.com Library web components package severity 2 Affects major functionality, has a workaround
Projects
None yet
Development

No branches or pull requests

3 participants