-
Notifications
You must be signed in to change notification settings - Fork 26
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
Create vertical layout option #11
base: master
Are you sure you want to change the base?
Conversation
I'm playing around with some details for aligning the weather timestamps to the vertical bar. In Dark Sky, it appears that the timestamp falls near the middle of that bar. So hours |
@vsergeev I think it's ready for you to take a look. Let me know what you think: |
@mhkeller thanks, this looks like a good start. I have a couple of feedback items:
The commits can also be squashed down into two commits, one that adds the layout setting (first commit), and one that adds the vertical layout. |
Woops on I noticed that there is no sunrise / sunset information for the current day anymore because that is only in the expandable component. I'll add those elements to the text information at the top. |
Yeah, I think a relative view height would be good in place of the fixed height. |
b715171
to
899cf36
Compare
Some updates:
This should be fixed.
Fixed. Removing the height seemed to work fine.
Fixed
Fixed
Fixed
This is the only thing that didn't work out well.The width becomes too narrow for there to be much variation on the temperature scale. Here's a screenshot. Separately: I added the sunrise and sunset times back and I standardized their look between the two components. |
899cf36
to
e16831a
Compare
I increased the padding in some places for better tap accessibility and lightened up the temperature range so it's more easily scannable to the eye. |
One other thing that's missing from today's view is when it's raining, it should display the Precipitation and Amount fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR introduces unrelated changes and breaks the default color scheme and formatting. I think it's headed in the right direction overall, but I have to emphasize that the PR should have absolutely no impact on the rest of the app or to the existing horizontal layout. It also shouldn't try to incorporate new features that are outside the scope of the PR ("Create vertical layout option").
High level feedback:
- Adding precipitation and sunrise/sunset information to the top details should be a separate discussion and possibly PR. In it's current form, I'm not willing to add those fields because they're poorly formatted on desktop with two line rows that impair the readability of the other fields, and it's an open question whether these fields here add to the app or compromise its simplicity.
- For the width, we can use a media query to be 100% in mobile and 75% on desktop, so it's easy to read the vertical layout on both (without excessive left-right eye scanning on desktop).
- The temperature pills are vertically aligned with the lines, but I think it would look better if the hour and description on the left were vertically aligned with the lines too.
- Please compare the effect of your branch with the current deployment in both mobile and desktop. There are some regressions -- I've attached two screenshots as examples:
@@ -4,7 +4,7 @@ | |||
"version": "1.0.0", | |||
"type": "module", | |||
"scripts": { | |||
"dev": "vite", | |||
"dev": "vite --host", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't belong in this commit or PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to help test and can be removed before the final merge
|
||
{#if precipitation.precipitation_probability !== undefined && precipitation.precipitation_amount !== undefined} | ||
<div> | ||
<span class="text-sm md:text-base font-semibold">Precipitation:</span> <span class="text-sm md:text-base">{precipitation.precipitation_probability}%</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These line indents need to be normalized. You can run npm run format
to format automatically.
@@ -19,7 +19,7 @@ | |||
<div class="text-right min-w-fit" style="min-width: {margin_left === 0 ? 'min-content' : `${margin_left}%`};"> | |||
<Temperature value={low} /> | |||
</div> | |||
<div class="bg-gray-800 dark:bg-gray-400 my-0.5 mx-1.5 rounded-xl" style="width: {100 - margin_right - margin_left}%;" /> | |||
<div class="bg-gray-400 dark:bg-gray-400 my-0.5 mx-1.5 rounded-xl" style="width: {100 - margin_right - margin_left}%;" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change affects the default color scheme...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll put this in a separate PR
@@ -74,6 +74,15 @@ export interface ProviderFactory { | |||
fromParams(params: object, location?: Location): Provider | null; | |||
} | |||
|
|||
export interface SunTimes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Types here should be limited to the boundary between the backend provider and the frontend, not auxiliary types for components. I think those components are simple enough that they aren't really necessary, anyway.
Sure thing. I incorporated some accessibility and duplicate content fixes that I encountered but can create new issues for those. I can explain the reasoning for them in those issues and would be in favor of including them since there is some duplicate information that would adversely affect the UX for the vertical layout. |
Can you explain what you mean by this? Do you mean the horizontal line looks like it's not at the centerline of the text? Maybe you can send a screenshot of what you're seeing so I can make sure the fix is getting at the right thing. |
I think so. Sure, here is a screenshot: |
Got it. Yea that looks different from mine. What browser and OS are you using so I can try to replicate? |
I'm using Firefox 111 on Linux. I see it in Google Chrome 111 too. |
I've added a View tab to the Settings on |
6ba04fc
to
91e8eef
Compare
Hi @mhkeller. Were you able to address this? |
@msft-jeelpatel, I didn't have the bandwidth to test this out since it was fine on my machine and I don't a Linux to test on. I won't have the time to finish this PR but if someone wants to pick it up, feel free to! I'll close this and if someone wants to resurrect it, then by all means they should |
Reopening if other ppl want to work on it |
@patel-jeel92 I can help with some of the formatting issues to get this PR to the finish line. |
Hi @vsergeev I have started a new PR #21 to add the vertical layout. The reason i chose to add a new PR is because i have forked the repo and created a new branch off of it. Plus this had a bunch on conflicts and i found it easier to start over. Huge thanks to @mhkeller for starting the initial work! |
#9 Creates an option in settings to have a vertical layout, similar to Dark Sky
Here's a first go at it. Needs more mobile testing and check if the math is right aligning the times alongside the vertical bar and that the temperatures are scaled correctly.
Let me know what you think.