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 look of Pokémon marker label #2476

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

daangroot
Copy link
Contributor

Description

Small improvement of style and formatting of the Pokémon marker label.
See screenshots below for the changes made.

Motivation and Context

I did not really like the look of the label, so I thought lets make it more beautiful :)

How Has This Been Tested?

Tested on my main setup.

Screenshots (if appropriate):

Old:
old

New:
new

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@darkelement1987
Copy link
Contributor

I like it! The way it shows IV's is much better like this.

Copy link
Contributor

@jaake77 jaake77 left a comment

Choose a reason for hiding this comment

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

I like it. Works.
image

@ghost
Copy link

ghost commented Feb 2, 2018

I like this, minimal and easier to read, how would it account for the recent PR #2475 (adding gen info to marker labels), possibly next to level?

Copy link
Member

@sebastienvercammen sebastienvercammen left a comment

Choose a reason for hiding this comment

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

Increase top margin on the link for the coordinates. People on mobile + fat fingers = accidents.

@Alderon86
Copy link
Contributor

Alderon86 commented Feb 2, 2018

@daangroot add margin-top: 5px; to the # nav part to make the changes @sebastienvercammen suggested for fat fingers.
Without Iv:
noniv
With Iv:
iv

@daangroot
Copy link
Contributor Author

@sebastiaanvercammen I don't see why a top margin would help. There is nothing above it that could be pressed, so nothing can go wrong.

@Alderon86
Copy link
Contributor

@daangroot u could press something like exclude or notify for e.g.

@daangroot
Copy link
Contributor Author

Oh yes sorry, did not think about the no iv label.

@daangroot
Copy link
Contributor Author

I added a 5px top margin to the navigate class as suggested.

@daangroot daangroot closed this Feb 3, 2018
@daangroot daangroot reopened this Feb 3, 2018
@@ -79,11 +79,13 @@
}

&.navigate {
position: absolute;
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need that? im not a fan of position: absolute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's how it was done before. It can be done differently but this is the easiest way.

@@ -94,6 +96,6 @@
display: block;
height: 48px;
width: 48px;
margin-bottom: 11px;
margin-bottom: 15px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we would have to increase it?
Also, can u provide a screenshot with the difference compared to my simple change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To align the links on the left with the location link. I think it looks better this way.
image

@dripdropper
Copy link

You should consider leaving the ADS labels on the IVs to eliminate confusion. Many (not all) tools use ADS, but the in-game appraisal uses SAD.
Otherwise it looks like good, especially the size reduction, which helps to keep things on-screen. It's too bad the Google marker API is too stupid to place the InfoWindow in a direction that keeps it on-screen.

@daangroot
Copy link
Contributor Author

@dripdropper I removed them because it looked better, but I can understand that it might cause confusion, so I will add them back.

@fosJoddie
Copy link
Contributor

nice changes, looks neat and triggers no warning or epileptic episodes

@jaake77
Copy link
Contributor

jaake77 commented Feb 6, 2018

Werks Gud. Thanks for your efforts.

@sirdemoncze
Copy link

Thanks. It works perfect 👍.

Copy link
Contributor

@Alderon86 Alderon86 left a comment

Choose a reason for hiding this comment

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

👍 good work

@billyjbryant
Copy link
Contributor

Looks good and works.

Copy link
Member

@sebastienvercammen sebastienvercammen left a comment

Choose a reason for hiding this comment

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

Final change, rest looks OK. 👍

static/js/map.js Outdated
@@ -506,7 +506,7 @@ function initSidebar() {
}

function getTypeSpan(type) {
return `<span style='padding: 2px 5px; text-transform: uppercase; color: white; margin-right: 2px; border-radius: 4px; font-size: 0.6em; vertical-align: middle; background-color: ${type['color']}'>${type['type']}</span>`
return `<span style='padding: 2px 5px; text-transform: uppercase; color: white; margin-right: 2px; border-radius: 4px; font-size: 0.75em; vertical-align: middle; background-color: ${type['color']}'>${type['type']}</span>`
Copy link
Member

Choose a reason for hiding this comment

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

Move all the inline CSS to the stylesheet, and remove the getTypeSpan function. Since the HTML will be much shorter, it'll be clearer if it's no longer a separate function.

@daangroot
Copy link
Contributor Author

daangroot commented Feb 16, 2018

Most up-to-date look of the label:
image

@michikrug michikrug mentioned this pull request Feb 16, 2018
6 tasks
Copy link
Member

@sebastienvercammen sebastienvercammen left a comment

Choose a reason for hiding this comment

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

RE: Discord:

[11:57 PM] Konturka: There is a small issue though. The type is not centered inside its box on some mobile browsers.
[11:58 PM] Konturka: This was already an issue but it was less noticeable because the font size was smaller.(edited)
[12:00 AM] Konturka: On chrome and samsungs browser it's not centered.
[12:00 AM] Konturka: On firefox it is.

Screenshot

@billyjbryant
Copy link
Contributor

Looking at the Type box code and testing locally

@billyjbryant
Copy link
Contributor

Adding padding-top: 0.45em (or padding-top:2.25%) on the .type element fixes it for mobile browsers but breaks on desktop. this could probably be fixed by adding the necessary overrides to mobile.scss

@daangroot
Copy link
Contributor Author

@sebastienvercammen I've tried a lot of things to make the type text centered, but I couldn't fix it.

@daangroot
Copy link
Contributor Author

daangroot commented Feb 24, 2018

Maybe we can merge it and fix it afterwards. I can make an issue for this problem, so other people are aware of it and can maybe fix it.

@sebastienvercammen
Copy link
Member

sebastienvercammen commented Feb 27, 2018

@daangroot We won't merge without the fix. The PR is instead tagged as "help wanted".

@daangroot
Copy link
Contributor Author

daangroot commented Mar 22, 2018

Hopefully the final look:

image

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

Successfully merging this pull request may close these issues.

None yet

9 participants