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

Week view incorrectly displays events when a day contains overlapping events #130

Closed
TomJanse opened this issue Nov 4, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@TomJanse
Copy link

TomJanse commented Nov 4, 2022

When two events in the week view are overlapping they become half as wide to fit over each other. This is perfectly fine. The problem is that when this happens at any time in that day all other events that day adapt the same half-size measure even if they are not overlapping with anything.

I would expect only the overlapping events to become small and all other events to remain the same.

My week view looks as follows:

WeekView(
      key: _weekViewStateKey,
      heightPerMinute: heightPerMinute,
      onEventTap: _onEventTap(),
      weekPageHeaderBuilder: (weekStartDate, weekEndDate) {
        return DayPageHeader(
          date: weekStartDate,
          dateStringBuilder: (date, {DateTime? secondaryDate}) {
            return DateFormat.yMMMd(Platform.localeName).format(weekStartDate) +
                ' - ' +
                DateFormat.yMMMd(Platform.localeName).format(weekEndDate);
          },
          onNextDay: () {
            _weekViewStateKey.currentState!.nextPage();
          },
          onPreviousDay: () {
            _weekViewStateKey.currentState!.previousPage();
          },
          backgroundColor: CupertinoDynamicColor.resolve(
              CupertinoColors.secondarySystemBackground, context),
        );
      },
    );

Visual of the week view with the issue happening:
Screenshot 2022-11-04 at 09 53 12

In the image, if we take a look at Thursday for example, the events from ~12:30-2:30 overlaps with ~2:30-4:30. It may look a little weird but the end and start of them are at the exact same moment so that makes sense, but I see no reason for the event from ~9:30-10:30 to also be half size.

Not sure if this is a bug or something I can change myself. Help would be appreciated!

@ParthBaraiya ParthBaraiya added bug Something isn't working priority:1 Bug/Enhancement with highest priority. labels Nov 19, 2022
@faiyaz-shaikh
Copy link
Contributor

Fixed in 1.0.1 PR #135

@porum
Copy link
Contributor

porum commented Dec 9, 2022

Now, if events are seamless (such as EventA's start time is same as EventB's end time), may be make they full width is better.

B

@PRBaraiya PRBaraiya removed the priority:1 Bug/Enhancement with highest priority. label Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants