directus-labs / extensions

Experimental and community-maintained extensions for Directus
MIT License
38 stars 8 forks source link

Gantt Chart Layout #45

Closed Arood closed 4 weeks ago

Arood commented 2 months ago

Adds a Gantt Chart Layout to Directus.

Notes:

Arood commented 2 months ago

-1. Fixed -2. The library used isn't very responsive in this way as it's rendering svgs on the fly, but I found a configuration to extend the "padding" used, so it looks better on most common screen sizes -3-5. Added error handling now, opted to use the notification store to display any date interval errors so the view can still be used without it crashing. -6. Fixed -7. Should be fixed, seemed to be a CSS issue

phazonoverload commented 2 months ago

Any update on 5, 6, and 7 @Arood ?

Arood commented 2 months ago

@phazonoverload oh, didn't notice that Github ruined my formatting, they are all done

ComfortablyCoding commented 2 months ago

All points aside from 6 look to be fixed/addressed.

Feedback

  1. Upon re-review the time still changes when I change days, same for other units (changing month also changes days etc).

https://github.com/user-attachments/assets/78453e5b-a7a9-40f4-ac40-c34603c26f5f

  1. The notice now displays on any change, we should maybe only display it on initial navigation/page load?
  2. The app still crashes if start_date and end_date are not set. If only one is not set then the notice displays as expected and everything works.
Arood commented 2 months ago

@ComfortablyCoding I noticed when testing that the issue might appear when using a Datetime-type, but it works as intended with Timestamp. Which seems to make sense as Datetime doesn't contain any timezone information, so I need to handle that. Does that description match your collection setup when testing?

ComfortablyCoding commented 2 months ago

@ComfortablyCoding I noticed when testing that the issue might appear when using a Datetime-type, but it works as intended with Timestamp. Which seems to make sense as Datetime doesn't contain any timezone information, so I need to handle that. Does that description match your collection setup when testing?

Yes, that does seem to be the case.

phazonoverload commented 2 months ago

What's left to get this finished? It's running a bit behind.

ComfortablyCoding commented 2 months ago

What's left to get this finished? It's running a bit behind.

The issues outlined in https://github.com/directus-labs/extensions/pull/45#issuecomment-2325232688

Arood commented 2 months ago

Oh, I was just looking at this and sent a new update :)

I believe I figured out how to fix the date issue, thanks for confirming the issue @ComfortablyCoding

Regarding the errors I adjusted so the error shows once per set of items that errored (stored in sessionStorage so it resets for each session).

ComfortablyCoding commented 2 months ago

Oh, I was just looking at this and sent a new update :)

I believe I figured out how to fix the date issue, thanks for confirming the issue @ComfortablyCoding

Regarding the errors I adjusted so the error shows once per set of items that errored (stored in sessionStorage so it resets for each session).

Sounds good, should issue #3 regarding the app crashing be addressed as well in the last update?

Arood commented 2 months ago

@ComfortablyCoding Ah sorry, I missed that one. Should be easy enough to add a check there though, I'll fix it in a few mins

Arood commented 2 months ago

@ComfortablyCoding there we go! Added another error notification, handled the same way as the invalid date interval error

phazonoverload commented 1 month ago

I'm sure you got this, but we held this back to release in October's set. :)