-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(content): add fixedSlotPlacement prop #29233
Conversation
* For example, if a FAB in the fixed slot should receive keyboard focus before | ||
* the main page content, set this property to `'beforeContent'`. | ||
*/ | ||
@Prop() fixedSlotPlacement: 'afterContent' | 'beforeContent' = AFTER_CONTENT_SLOT_POSITION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bikeshedding: Thoughts on the value names?
I think fixedSlotPlacement
makes sense here. We use labelPlacement
in forms control to describe where the visible text is placed relative to the form control in the DOM, so this naming is consistent with other APIs.
For the values we tend to use kebab case, so before-content
and after-content
could make sense. However, I could be convinced to just call it before
and after
. The prop description already describes that this prop controls the slot positioning relative to the content, so I don't know how much devs get by having to repeat the content
terminology.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we don't typically use camelCase when writing values for strings. For example:
// datetime.tsx
@Prop() presentation: DatetimePresentation = 'date-time';
// segment-button.tsx
@Prop() layout?: SegmentButtonLayout = 'icon-top';
I also don't see any benefit to including the word content
as this is really placing it before or after the scroll element. I vote we change this to before
and after
.
Issue number: Internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Content in the `fixed` slot is always placed after the main content in the DOM. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - A new `fixedSlotPlacement` prop on Content allows developers to place fixed content either before or after the main content in the DOM ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information Dev build: `8.0.0-dev.11712072527.1dd97c66` <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->⚠️ This feature will not be part of the v8.0 release. As a result, do not merge this into `feature-8.0`. However, I am putting this PR up based off `feature-8.0` so it can get reviewed by the team. --------- Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Issue number: Internal
What is the current behavior?
Content in the
fixed
slot is always placed after the main content in the DOM.What is the new behavior?
fixedSlotPlacement
prop on Content allows developers to place fixed content either before or after the main content in the DOMDoes this introduce a breaking change?
Other information
Dev build:
8.0.0-dev.11712072527.1dd97c66
feature-8.0
. However, I am putting this PR up based offfeature-8.0
so it can get reviewed by the team.