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

Improve styling of premiere date box #2611

Merged

Conversation

Aiz0
Copy link
Contributor

@Aiz0 Aiz0 commented Sep 23, 2022


Improve styling of premiere date box

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue
no related issue

Description
Fixes some issues I had with the styling of the premiere date box and tries to bring it up to par with how it looks on YouTube.

  • Border radius is set with px instead of %
    This is good because it makes the border radius circular instead of oval-shaped.

  • Adds some additional offset so the box isn't hugging the bottom-left of the video

  • Use flex-box to align text vertically instead of relying on margins
    The text is now more centered than ever.

  • use min-width instead of a set width.
    Looks better because there's less empty space normally and the "Please refresh soon" message is put on 1 line

  • increase opacity of the box from 0.7 to 0.8.

  • Make timestamp smaller and bold.
    looks similar to YouTube.

  • adds more margin between text, icon, and box edges

Screenshots (if appropriate)

Before:
2022-09-23_T22:03:50
2022-09-23_T22:04:32

After:
2022-09-23_T21:54:53
2022-09-23_T21:48:40

Testing (for code that is not small enough to be easily understandable)
https://www.youtube.com/watch?v=O3cCYok_ukk

Desktop (please complete the following information):

  • OS: Arch Linux
  • OS Version: 5.19.8-arch1-1
  • FreeTube version: 0.17

Additional context
I added a span around Premiere time left but ended up not using it

Might need to wait for #2610 or the other way around since both change the same line in Watch.vue

a 5% border radius will create an oval shape when height and width differ.
this doesn't look good.
5px radius looks better and is used in other places
Increases the offset a tiny amount and adds a left offset aswell.
This looks better than when it was previously only offset from the bottom.
I used 12px because it's what youtube uses.
vertically centes premiere icon and text with by making their parent a flexbox

sets a min width for the text instead of using a set width for the premiereDate
line height 1.2 did not affect anything
@PrestonN PrestonN enabled auto-merge (squash) September 23, 2022 21:43
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 23, 2022
@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Sep 24, 2022
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

auto-merge was automatically disabled September 25, 2022 01:35

Head branch was pushed to by a user without write access

@PrestonN PrestonN enabled auto-merge (squash) September 25, 2022 01:35
@github-actions
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@Aiz0
Copy link
Contributor Author

Aiz0 commented Sep 25, 2022

Merge conflicts have been fixed now

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
auto-merge was automatically disabled September 26, 2022 20:57

Head branch was pushed to by a user without write access

@PrestonN PrestonN enabled auto-merge (squash) September 26, 2022 20:57
Copy link
Member

@absidue absidue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@PrestonN PrestonN merged commit 498ae77 into FreeTubeApp:development Sep 26, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Sep 26, 2022
@Aiz0 Aiz0 deleted the improve-styling-of-premier-date-box branch October 15, 2022 02:42
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

Successfully merging this pull request may close these issues.

None yet

5 participants