-
Notifications
You must be signed in to change notification settings - Fork 23
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
Sticky list headers #397
base: main
Are you sure you want to change the base?
Sticky list headers #397
Conversation
Great contribution! 👏 I think we could consider making stickiness the default behavior for the list headers, like it is for the group headers. What do you think @barmac? Let's have our designer take a look too. cc. @lmbateman (Task > Inputs > Assignment type > Map > Map entries) I prepared a test branch in
I'll continue with a proper code review when we decide if we want to make it the new default. |
@@ -826,6 +826,18 @@ textarea.bio-properties-panel-input { | |||
height: 32px; | |||
} | |||
|
|||
.bio-properties-panel-list-entry-header.position-sticky { | |||
position: -webkit-sticky; /* for safari */ |
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.
position: sticky
is now widely available for all major browsers. I think we can skip it.
I agree. It works great for the groups, so there's no reason to not make it the default for lists too. |
Proposed Changes
Related to bpmn-io/bpmn-js-properties-panel#1103
These changes allow list headers to become sticky to the properties panel when scrolled past. This is particularly useful when managing long lists of values, as it eliminates the need to constantly scroll back up to add new elements to a list or map. It is especially convenient for maps where each entry contains multiple fields making scrolling distance quite long.
Additionally, there is the ability to set nesting levels for headers, which is useful when working with multiple nested lists or maps. This value is used to set z-index and top margin for the sticky position and to properly detect stickiness with
useStickyIntersectionObserver
hook.A value of 1 means that the list is at the first nesting level within its group section. If this property is not set, the header will behave as before.
How it looks like
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}