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

Is there a way to stack events and not offset them ? #290

Closed
stephenhauck opened this issue Nov 17, 2023 · 20 comments · Fixed by #294 or #405
Closed

Is there a way to stack events and not offset them ? #290

stephenhauck opened this issue Nov 17, 2023 · 20 comments · Fixed by #294 or #405
Labels
bug Something isn't working in progress This label defines issues that are in progress. priority:1 Bug/Enhancement with highest priority.

Comments

@stephenhauck
Copy link

We want to stack these and not offset them unless the times overlap ...
image

@lock-pay
Copy link

I am currently having the same problem with this package. My first guess would be to try and make it so that event are built with an end date 1 min or 1 second before the actual date. I don't know how to do that in the EventBuilder yet.

@stephenhauck
Copy link
Author

@Eretik33-176 that's not really a legit "fix"

@stephenhauck
Copy link
Author

anyone ?

@stephenhauck
Copy link
Author

OK will I did some digging and in the MergeEventArranger code seems to be where it decides if they overlap and simply having the same start and end time seems to be a reason to overlap so it slides them .....

@PRBaraiya
Copy link
Collaborator

@stephenhauck That is the default behavior of that arranger. We will add a flag in those arrangers to decide whether these kinds of events should stack or offset.

@PRBaraiya PRBaraiya added enhancement New feature or request priority:3 Bug/Enhancement with priority level 3. labels Nov 22, 2023
@PRBaraiya
Copy link
Collaborator

We will need that flags in MergeEventArranger and SideEventArranger.

@stephenhauck
Copy link
Author

stephenhauck commented Nov 22, 2023

When it's building the layout it throws errors if you use midnight as a start or end time too ...
I/flutter ( 9310): Failed to add event because of one of the given reasons:
I/flutter ( 9310): 1. Start time or end time might be null
I/flutter ( 9310): 2. endTime occurs before or at the same time as startTime.
I/flutter ( 9310): Event data:
I/flutter ( 9310): {date: 2023-10-11 23:00:00.000, startTime: 2023-10-11 23:00:00.000, endTime: 2023-10-12 00:00:00.000, event: Instance of 'CalendarItemInfo', title: 11 PM Appointment, description: , endDate: 2023-10-12 00:00:00.000}

Any suggestions on how to deal with that ?

@PRBaraiya PRBaraiya added the in progress This label defines issues that are in progress. label Nov 23, 2023
@PRBaraiya
Copy link
Collaborator

PRBaraiya commented Nov 23, 2023

@stephenhauck That's because for start and end time, event arrangers will not consider the date i.e, year, month and day. So, here, end time 00:00:00 occures before start time 23:00:00. That's why it's giving the error.

Please refer issue #293 for more updates.

As for the work around, you can set end time to, 2023-10-11 23:59:00.000

PRBaraiya added a commit that referenced this issue Nov 23, 2023
@PRBaraiya PRBaraiya linked a pull request Nov 23, 2023 that will close this issue
7 tasks
PRBaraiya added a commit that referenced this issue Nov 23, 2023
PRBaraiya added a commit that referenced this issue Nov 24, 2023
ParthBaraiya pushed a commit that referenced this issue Dec 13, 2023
@DonnyDevIT
Copy link

I'm here because I would like to reopen the issue.

As you can see on this screenshot, the events are arranged and all looks good.
Screenshot 2024-08-01 alle 11 55 46

But on this screenshot, where have a big (yellow) event on the left, the arranger does not work properly. I expect that the dark ones on the right are not offsetted
Screenshot 2024-08-01 alle 11 54 48

@ParthBaraiya @PRBaraiya Can we please reopen this and take a look?

@PRBaraiya
Copy link
Collaborator

@DonnyDevIT Not sure if this will work, but can you try providing eventArranger argument. Here is an example,

DayView(
    eventArranger: SideEventArranger(
        includeEdges: true,
    ),
);

@DonnyDevIT
Copy link

Hi @PRBaraiya No does not work, it works fine until I put the big yellow on the left, maybe something that package developers does not had in mind

@PRBaraiya
Copy link
Collaborator

Need to reproduce this issue with exact durations as above events.

@PRBaraiya PRBaraiya reopened this Aug 2, 2024
@PRBaraiya PRBaraiya added bug Something isn't working priority:1 Bug/Enhancement with highest priority. and removed enhancement New feature or request priority:3 Bug/Enhancement with priority level 3. labels Aug 2, 2024
@DonnyDevIT
Copy link

Ok, tell me if you work on something or need something

@DonnyDevIT
Copy link

Any news?

@DonnyDevIT
Copy link

Sorry, any updates? im getting some trouble :) @PRBaraiya

@PRBaraiya
Copy link
Collaborator

Hi @DonnyDevIT , I'm working on this and will update the code as soon as possible.

@DonnyDevIT
Copy link

Okay thanks! I will wait with no reply then :) @PRBaraiya

@ParthBaraiya
Copy link
Collaborator

Hi @DonnyDevIT I tried to replicate your scenario. Does below screenshot shows the output you are expecting? I tried to replicate the event data from the screen shot you shared.
Screenshot 2024-09-14 005535

ParthBaraiya added a commit that referenced this issue Sep 13, 2024
@ParthBaraiya
Copy link
Collaborator

Hi @DonnyDevIT I tried to replicate your scenario. Does below screenshot shows the output you are expecting? I tried to replicate the event data from the screen shot you shared. Screenshot 2024-09-14 005535

@DonnyDevIT Please ignore the UI of the tile. I'm just trying to show the arrangement of the tiles.

ParthBaraiya added a commit that referenced this issue Sep 17, 2024
ParthBaraiya added a commit that referenced this issue Sep 17, 2024
ParthBaraiya added a commit that referenced this issue Sep 17, 2024
@ParthBaraiya ParthBaraiya linked a pull request Sep 17, 2024 that will close this issue
7 tasks
@DonnyDevIT
Copy link

@ParthBaraiya Yes, your screenshot is right, should be like this

ParthBaraiya added a commit that referenced this issue Sep 18, 2024
PRBaraiya added a commit that referenced this issue Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working in progress This label defines issues that are in progress. priority:1 Bug/Enhancement with highest priority.
Projects
None yet
5 participants