RFC: row renderer
See original GitHub issueIs your feature request related to a problem? Please describe.
Add an API to the calendar part of the timeline. This API would give you control to add custom UI on calendar rows using a render prop. You can control what is rendered by default with the library like Items and Vertical/Horizontal lines, and the renderer will provide you the ability to render custom backgrounds and droppable layers for custom dnd
Describe the solution you’d like
<Timeline
groups={groups}
items={items}
rowRenderer={({ rowData, helpers, getLayerRootProps, group }) => {
const { itemsToDrag, unavailableSlots, timelineLinks } = rowData
const groupUnavailableSlots = unavailableSlots[group.id]
? unavailableSlots[group.id]
: []
return (
<>
<UnavailableLayer
getLayerRootProps={getLayerRootProps}
getLeftOffsetFromDate={helpers.getLeftOffsetFromDate}
groupUnavailableSlots={groupUnavailableSlots}
/>
<DroppablesLayer
getLayerRootProps={getLayerRootProps}
itemsToDrag={itemsToDrag}
getLeftOffsetFromDate={helpers.getLeftOffsetFromDate}
handleDrop={this.handleDrop}
group={group}
/>
</>
)
}}
rowData={{
itemsToDrag: this.state.itemsToDrag,
unavailableSlots: this.state.unavailableSlots,
timelineLinks: this.state.timelineLinks,
}}
/>
Describe alternatives you’ve considered
keep the plugin system (undocumented)
Additional context
Check out the full RFC: https://github.com/namespace-ee/react-calendar-timeline/blob/rowRenderer/rfcs/row-renderer/index.md
Checkout prototype at the row-renderer
branch on the repo
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:26 (2 by maintainers)
Top Results From Across the Web
RFC 1942 - HTML Tables - IETF Datatracker
Cells can be merged across rows and columns, and include attributes assisting rendering to speech and braille, or for exporting table data into...
Read more >[RFC] Row virtualization overscanning tradeoff #270 - GitHub
[RFC] Row virtualization overscanning tradeoff #270 ... want to have a limit to the size of the buffer, rendering 10,000 rows can get...
Read more >RFC 4235: An INVITE-Initiated Dialog Event Package for the ...
Each row contains the state of that dialog, as conveyed in the document. ... The "sip.rendering" parameter is useful in applications such as...
Read more >They address this in the RFC. They use JSON as a base transport ...
Presumably the same could be said of renderers targeting e.g. CLI, ... placeholder string values like "$1", "$2", that later get filled in...
Read more >MS RFC 54: Rendering Interface API — MapServer 8.0.0 ...
This RFC proposes the refactoring of MapServer's rendering backends, ... //step between the beginning of each row in the image unsigned int row_step; ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jabidof there will be several performance bosts but it has to do more of trying to eliminate expensive calculations/renderers rather than through vertical rendereing. for example this is profiling of a simple drag of an item horizontally.
As you can see in the img. a drag horizontally affected every item on the screen and required a renderer. This is because internally all the items are rendererd in the same div and their absolute position is relative to the calendar so their top/left is changing every interaction.
With this new method. You are relative to your row rather than the whole calendar and all the existing items. This should limit renderers to only affect the row you are rendered in and only render the items inside the row. Or if moved vertically it should only render your group and then group effected without affecting any of the other groups.
We’ve tried to resolve conflicts from master and merged the rowrenderer work into a fork we have here: https://github.com/routific/react-calendar-timeline, there’s a lot of great work from @Ilaiwi that we’re trying to utilize; We’re doing some testing now but aside from a few small issues we’ve fixed it largely seems stable. Once we’ve finished testing we’ll happily open a PR to this original master with conflicts resolved for consideration.