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

Non offsetHours are misaligned by an hour #15

Open
davidvidmar opened this issue Jan 11, 2025 · 2 comments
Open

Non offsetHours are misaligned by an hour #15

davidvidmar opened this issue Jan 11, 2025 · 2 comments

Comments

@davidvidmar
Copy link

davidvidmar commented Jan 11, 2025

I'm trying out design options and I believe offsetHours are not working as intended and the block that the number is positioned over is 1 hour forward.

Comparing offsetHours = false and offsetHours = true I think number 7 should be over current block, not number 8 as the time in the screenshots is ~7:45.

offsetHours = true:
image

offsetHours = false:
image

@frlequ
Copy link
Owner

frlequ commented Jan 11, 2025

To be clear: when offsetHours = false, the numbers represent tariff blocks (i.e., the 1st, 2nd, 3rd block), which is what this card is designed to do. Note that from 0:00 to 1:00 is the FIRST block.

offsetHours = true was implemented because some users find the numbers confusing and prefer them to represent hours.

So, I think you are mixing two different things here: displaying numbers as blocks versus displaying numbers as hours.

@davidvidmar
Copy link
Author

davidvidmar commented Jan 11, 2025

Ok, I do (think) I understand you. I'm pulling my PR.

Not sure why this way of marking (hour) blocks would help... I have never seen hour blocks represented by count staring from 1. On www.uro.si and www.gen-i.si pages they are represented starting from 0.

Example:
image
(source: https://www.uro.si/prenova-omre%C5%BEnine/novi-%C4%8Dasovni-bloki)

PS: I genuinely appreciate effort in creating this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants