vas3k / lovelace-berlin-transport-card

Lovelace card for https://github.com/vas3k/home-assistant-berlin-transport
MIT License
11 stars 2 forks source link

Add option to show relative time #5

Closed mrueg closed 8 months ago

mrueg commented 8 months ago

Not super happy with the layout yet, in particular on mobile it gets a bit too dense.

mrueg commented 8 months ago

Depends on https://github.com/vas3k/home-assistant-berlin-transport/pull/31 and fixes https://github.com/vas3k/lovelace-berlin-transport-card/issues/3

vas3k commented 8 months ago

Still WIP or can be reviewed?

mrueg commented 8 months ago

I'm not super happy how it displays on mobile (as you'll get multiple lines then because the boxes get too small).

fwiw this is how it looks right now in browser:

Screenshot_20240117_104808

What do you think?

vas3k commented 8 months ago

What do you think?

I see two options here:

  1. Let users choose only one option - absolute or relative time. I think it's rare for anyone to need both at once.
  2. Automatically hide the absolute time via CSS or JS if the width of the widget does not allow both times to be displayed. Or you can automatically shorten "in 3 mins" to "3'", as is done on some BVG displays
mrueg commented 8 months ago

Good idea, I replaced the in X min with X'! This is now ready for review

mrueg commented 8 months ago

@vas3k any chance to review / merge this one? Thanks!

mrueg commented 8 months ago

Sorry for delay, I was sick the whole week 🤧

oh no, hope you feel better! sorry for bugging you and thanks for the merge :)