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

Add BoxDecoration theme to header container and hours container (left side) #39

Closed
TatsuUkraine opened this issue Jul 14, 2020 · 8 comments
Labels
T: Feature Type: :tada: New Features

Comments

@TatsuUkraine
Copy link
Contributor

TatsuUkraine commented Jul 14, 2020

Add the ability to define BoxDecoration for the header container and hours container.

It will be useful to keep the timetable up to date with any custom theme (like shadows aka Material elevation, shapes, borders and etc.) that dev is using in his App.

P.S. Sorry that I'm spamming your package with issues)) But everything that I create is something that I need in my current task)

@TatsuUkraine TatsuUkraine added the T: Feature Type: :tada: New Features label Jul 14, 2020
@TatsuUkraine TatsuUkraine changed the title Add BoxDecoration theme to header container Add BoxDecoration theme to header container and hours container (left side) Jul 14, 2020
@JonasWanke
Copy link
Owner

Until this is implemented: The Timetable widget is just a Column with a TimetableHeader and TimetableContent, optionally wrapped with TimetableTheme. My plan was to also expose TimetableHeader and TimetableContent, so you can e.g. put the header in your app bar and the content below it, similar to how Google Calendar does it. Unless you have a reason against it, I'll add a second export file (something like package:timetable/timetable_internals.dart) which exports these two and leaves you with more options than just a simple BoxDecoration for the header.

For the hours (painted by DateHoursPainter), a decoration parameter in the theme is the easiest solution for now.

The issues are no problem, that's what they're for :) Do you have an estimate of when you need these features in your project? With #17 in mind, I'm not sure if it's worth adding customization options in this "old" version. I hope I can start implementing the new architecture in week 32 (3 weeks from now) when most of our exams are over, and a version with a mostly stable API and the current features (potentially more) should be available within a week from then, as my lectures are over soon.

@TatsuUkraine
Copy link
Contributor Author

yep, I saw that it's just a Column, and TimetableHeader has Row with leading header and dates+all day event header. Proposition regarding box decoration appeared in my head just for simplification) since I can imagine that in most cases current layout (overall layout I mean with header and content) will fit for a lot of devs, while theming of the header container might be quite often case in order to keep it up to date with Material styling.

Overall theme prop for the header may solve some simple cases (and probably most common ones), while the ability to make own layout fromTimetableHeader and TimetableContent is much more flexible but in the same time I can assume much rarer case.

I personally would like to have both))) theme prop - if I want some small customization like a shadow for example, and exposed Widget - for much deeper customization

@TatsuUkraine
Copy link
Contributor Author

Do you have an estimate of when you need these features in your project?

Yesterday 😁 kidding) but overall, the case here that I will need something similar to Google calendar (it's layout itself)

Currently, in this package, there are no delimiters like border or shadow between content and header, and since both of them have white background, I'm sure on 100% that our designer will ask to add anything to split them) the problem is that I don't know when it will be, but I know that this moment will come for sure)

@TatsuUkraine
Copy link
Contributor Author

maybe (from the UX standpoint, not specific to my case) header is needed its own default decoration? similar to Google calendar maybe. But pitfall of this solution - this can be counted as a breaking changes

@TatsuUkraine
Copy link
Contributor Author

but, if something, I can use my fork until #17 will be done, not a problem at all

@JonasWanke
Copy link
Owner

I'd prefer it if you use the fork for this customization until #17 is done. I'll think about using some kind of divider by default in the future

@TatsuUkraine
Copy link
Contributor Author

sure, no problem at all)

@TatsuUkraine
Copy link
Contributor Author

@JonasWanke btw, just a note, when you will be adding customization, maybe you can also change the order of the widgets in the body. The issue is that currently regular direction for a column is used (header, content). This means that content is actually placed above the header in the tree in terms of z-index positioning. Which creates some problems with decoration apply to the header like shadow, because content overlays it. Just something to keep in mind)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Feature Type: :tada: New Features
Projects
None yet
Development

No branches or pull requests

2 participants