Skip to content
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

chore: add support for custom container css class #299

Closed
wants to merge 1 commit into from

Conversation

Lucianovici
Copy link
Contributor

This cal-event-container was not present in the older versions.
Let's add a way to customize it, similar to how we do it for the event itself (with cssClass).
Thanks!

@codecov-io
Copy link

codecov-io commented Aug 2, 2017

Codecov Report

Merging #299 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #299   +/-   ##
=======================================
  Coverage   96.31%   96.31%           
=======================================
  Files          29       29           
  Lines         516      516           
  Branches       49       49           
=======================================
  Hits          497      497           
  Partials       19       19
Impacted Files Coverage Δ
src/components/day/calendarDayView.component.ts 93% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a28511...dd1694b. Read the comment docs.

@mattlewis92
Copy link
Owner

Hi there, thanks for the PR, would you mind explaining a bit more about your use case for this? I'm just curious as I didn't imagine a situation where you would need to add a class on the container which is only used as a way of controlling drag + drop / resizing which shouldn't require any additional styling. Thanks!

@Lucianovici
Copy link
Contributor Author

Hi @mattlewis92
I have this kind of resource management panel with day views for each resource.

https://www.dropbox.com/s/wnygrddt5vsoesk/Screenshot%202017-08-03%2013.32.09.png?dl=0

There can be max two events at the same time, so they need to share the hour segment.
I can do it with event's cssClass alone, but the problem is that containers are overlapping, preventing the tooltip popup for one of the two events sharing the same hour segment, thus I need to have a way to adjust the container of the event.

Thanks.
PS: Is there a better way of accomplishing this?

@mattlewis92
Copy link
Owner

Ah ok that makes sense, thanks for taking the time to explain (also its super cool to see this lib being used in creative ways like this! 😄 ). I think it might be better if the event cssClass was just added directly to the events container element instead of the child event, as then you would still be able to target the child element with CSS. It's a breaking change, but nothing too painful to migrate.

@Lucianovici
Copy link
Contributor Author

Indeed! Yeah it makes more sense to add it to the container. Would you like to make that change? Or should I? But then we need a way to migrate from the older versions, any suggestions?

@mattlewis92
Copy link
Owner

I've just cut 0.20.0 with this change, the migration is pretty straightforward, just a small change to the CSS selector 😄

@Lucianovici
Copy link
Contributor Author

Great! Thank you. I appreciate. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants