-
-
Notifications
You must be signed in to change notification settings - Fork 533
Scheduler component #6092
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
base: master
Are you sure you want to change the base?
Scheduler component #6092
Conversation
I believe most of the bugs are now fixed. As for the other things you have mentioned:
I like it, but would rather leave this for a future version.
Not sure what to think about this. It's kinda an invalid state of the UI. I have tried some other schdulers and the also behave the same. SO I would just leave it as it is.
Still trying to figure this. |
Not sure about this one. For first, it would be much harder to implement as then we would somehow need to detect the collision of the HTML elements. Currently we just use mouse events, which is much easier to do. Also, it seems Teams is doing the same so I don't think it is wrong what we have |
I think we can just add nother label that explains it to the user what is going to happen |
#6092 (comment) |
It is a screenshot from the Teams app. I think it is a good approach for telling users what they have selected in a human-readable way. |
Oh. Yeah, agree. I was under impression you already done it. |
* Selection logic * Listen on document level with JS to cancel selection * Comment * Fix selecting css * Better transaction handling * Refactor transactions * SlotSelectionMode parameter * Enable selection in demo * Listen for document mouse only when selecting * Fix SelectionEnded * Use InvokeSafeVoidAsync in JSModule * Deselect when outside of valid day column * Add CSS file * Optimize slot mouse events to only use them when needed * Add extension methods to RenderTreeBuilderExtensions * Manually build slot and items * Add more Attribute overloads * Fix TW build error * null-coalescing * Refactor null selection dates * Remove unused totalSlots var * One line style * Add ThrottleDispatcher * Optimize loops with key * Remove unused BackgroundColor * DateUtils for Min and Max * Unregister previous mouseUpHandler if exists * Remove unused DraggableAttribute * Clean
Closes #475
It's a large PR, so I will try to break it down.
The Scheduler component is made as a generic component, with an API similar to DataGrid, where
TItem
is meant to define the collection of items that is edited and handled by the component. TheData
parameter is used to populate the component.At minimum, the
TItem
must haveTitle
,Start
, andEnd
fields named as such. However, they can be overridden if needed with Scheduler*Field
parameters.Scheduler has several supported view types.
Each of them has a separate parameter that affects it independently of other views. Such as Start and End time, work hours, etc.
Scheduler has a built-in editor that is enabled with
Editable
parameter. And when used it always checks if there exists a Field on TItem, that can be edited. If found, it will be possible to edit in the editor.If
Editable
is disabled, then users have to use callbacks to store and edit their Data items.We also support recurring items. They work by defining
RFC-5545
(see https://icalendar.org/Home.html) rules on a baseTItem
.This
Item
will then show any recurring item in a view. However, these recurring items will not be persisted or exist in theData
collection or parameter. It is up to the user to handle real occurrences independent of the UI in their system. Only exceptions to the rules, like deleted occurrences and rescheduled occurrences, will be stored as part of the Item.