werner-scholtz / kalender

An elegantly crafted Flutter calendar UI package.
MIT License
108 stars 29 forks source link

Some may be nice enhancements for the MonthView #17

Open charlieliu0327 opened 11 months ago

charlieliu0327 commented 11 months ago
  1. The height of cell in the MonthView can be customized by user or it can be flexible that the height will be expanded automatically when the number of events exceeds to replace the scroll bar.
  2. We can customize the widget of the MonthCellHeader. For example, we can add a counter to the header to count the total number of events in the cell or we can add the holiday event to the header cell that separates holiday and personal events.
  3. If the event title is longer than 1 line, it will be overflowed to the next line automatically because sometimes the event title maybe include lots of words.
werner-scholtz commented 11 months ago
  1. Hi i'm not 100% sure what you mean in the first point maybe a drawing could help.
  2. I like that Idea of adding a counter to the header I will make that possible with a custom builder.
  3. Is this related to the first point because events extend like this at the moment: image

Do you mean that events should make use of vertical space ?

charlieliu0327 commented 11 months ago

Thanks for your quick reply. Let me try to explain more with the 1. and 3. points :D.

  1. At now, the size of each rectangle cell is fixed. If the number of event tile in a day is more than the maximum number of the cell that can be shown, we need to use the scroll bar to see the rest of the events by scrolling down. But what if I want to see all the events at the same time, I can't handle it. So, if I can set the height of the cell by myself or the height can be dynamically expanded once the number of event tile meet the maximum, it's will be very great.

Here is the example below, in the day cell 9, the number of event tiles is 6 and we need to use the scroll bar to scroll up or down to check the events. What I hope to have is the cell can expand vertically and don't need the scroll bar anymore. image

  1. Yes, the events should make use of vertical space, because the event tile expanding horizontally is something related to the DateTimeRange. If the event title is too long, it should be expanded vertically if I'm not misunderstanding. So, it maybe something related to the height of the event tile widget?
werner-scholtz commented 10 months ago

Hi sorry for the late response, I think I understand now what you mean and it can be a very nice feature. I will add this to my todo list it might take me a while to get around to it. If you want you can try doing it yourself ?