-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: Add background events #1161
base: master
Are you sure you want to change the base?
Conversation
b07da68
to
5546f41
Compare
Nice! I think this is a good start, in terms of API and internal separation from the "real" events. I think it may be helpful before continuing on an implementation to do some work speccing out a few things:
at that point i think we can DRY up places where there is a lot of overlap and separate more the points in which they differ. how's that sound? |
Sounds good! Thanks for the feedback! I'll spec out here first for feedback the use cases that the bg events feature enables and then specify how the bg events are different from plain events. After that, I'll proceed with:
|
Hi @jquense. Let me know your thoughts about this when you're free. Thanks! In which use-cases should we enable this feature?
In what specific ways are bg events different from plain events?
|
looks good @rrjoson I do wonder if we need the same layout mechanism as normal events for these as well. Do you know of any prior art aside from Full calendar we can look at for UX/UI on that front? |
@jquense sorry, I don't know any. Actually I was thinking of just copying the background event UI from Full calendar and just use a shade of blue so that it matches the default color for the events. What do you think? |
looks great 👍 |
9a22c0a
to
fb4f7a2
Compare
Any update on this? |
Sorry wasn't able to continue on this. Will try to finish it within the following week. |
22da0ef
to
e029e77
Compare
Hi @jquense When you're free, can I have a quick feedback on my progress here? Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@jquense anything I can do to help you out here? I'm creating a fork to use these changes, but would love to help merge into the official repo. |
This is a good PR and should be merged. Can we get an update on this @jquense |
Oops sorry this got lost in time. GH is bad at this and I'm not a good maintainer. If anyone wants to pick this and get it updated I'll merge it |
After doing some work/research I was able to achieve the desired result with the latest version of react-big-calendar. I essentially just provided a custom import nooverlap from 'react-big-calendar/lib/utils/layout-algorithms/no-overlap';
export default ({ events, minimumStartDifference, slotMetrics, accessors }) => [
...nooverlap({
events: events.filter((e) => e.type === 'background'),
minimumStartDifference,
slotMetrics,
accessors
}),
...nooverlap({
events: events.filter((e) => e.type !== 'background'),
minimumStartDifference,
slotMetrics,
accessors
})
]; By using the |
How does this implementation handles overlapping background events? |
I've picked this up in PR #1727 |
Summary of Changes
Notes
Screenshots