-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Adds a version number as per #1088 #1356
Conversation
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.
Cool! I'd like to request some changes:
- Could we use our existing "version" attribute from manifest.json? I'd like to avoid managing two sets of versions if possible.
- You should be able to get the version number from the manifest by calling chrome.runtime.getManifest.
- Could we restyle the version number to be less conspicuous? Consider all the elements in the popup and their relative importance. I think the version number is useful, but less useful than most of the rest of the popup. Maybe smaller text, some shade of gray, moved to a corner?
- Given the availability of Badger in several languages, I think we should make the "v" prefix localizable. My suggestion is to spell it out for clarity, like "version 2017.4.19.1". Should fit if moved to own line in a corner.
Thanks for the feedback. I've addressed some of the changes you requested, but couldn't figure out how to get localization to work. I updated |
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.
Please see my inline comments.
src/manifest.json
Outdated
@@ -93,5 +93,5 @@ | |||
"web_accessible_resources": [ | |||
"skin/*", | |||
"icons/*" | |||
] | |||
], |
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.
The trailing comma makes it invalid JSON (JSON is more constrained than JavaScript). Chrome doesn't let you load the extension; all the tests fail because of this.
src/skin/popup.html
Outdated
@@ -80,5 +80,6 @@ <h1 id="report_title" class="i18n_report_title"></h1> | |||
<center><button id="donate" class="pbButton" style="display:block" target="blank"><span class="i18n_donate_to_eff"></span></button></center> | |||
</div> | |||
<div class='clear'></div> | |||
<div class='footer'><span id="version" class="i18n_version"></span></div> |
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 like this more, but I have another suggestion: Could we try positioning the version string directly beneath the words Privacy Badger? Mockup attached below:
Here are the suggested changes:
- Reduce size of "Privacy Badger"
- Move "Privacy Badger" up a little bit to make room for the version string below
- Align "Privacy Badger" and version string along left edge
- Create white space below the title to give some breathing room to the title and the summary text below the title
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 think the localization is working (it says "hallo" instead of "version" because I changed the string in my en_US locale and reloaded the extension to show the new localization).
We should update the locale string however to support languages with different word order. This means using placeholders (#1329), which I'm not sure our current localization setup supports. This isn't a blocker though.
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.
Upon restarting my browser, the localization string "version" started being displayed. I guess it was working all along, but wasn't updating locally for me for some reason.
Regarding your suggested changes, I reduced the size of "Privacy Badger" and moved it up a bit, and aligned the version string along the left edge. I've only used CSS and handful of times before and couldn't figure out how to move the version string up. I tried the same technique I used to move "Privacy Badger" up (adjusting the margin), but it seems to be stuck at this height and won't go any higher:
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.
You should be able to move title/subtitle elements with position: relative
and (negative?) top
values. Though, could you go over this layout with someone who is more familiar with CSS than us? We are currently floating left a bunch of elements and we want to have these two text rows span the logo:
┌─── ┬────┐
│ logo ├────┤
└─── ┴────┘
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.
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.
That's great! Maybe tweak the amounts of white space a little (add some distance between the logo and the text).
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.
Also, you could set up your editor to do linting locally and live as you develop. To start with, you could just install the linter and run it manually on the codebase. From the Badger git checkout folder, run |
The failing job looks like an occasional bug in our Firefox test setup. Could you check up on a few things before we ship?
|
Yep I couldn't reproduce those, so I can't confirm that it doesn't make them worse, but my intuition would be no, since we moved the "Privacy Badger" text up to adhere to this layout, and so nothing got pushed down.
I made the string very, very long to check, and it wraps nicely: And long without wrapping:
It's not required for the app to run, as we have a default locale specified in We should eventually get this translated into other languages, but I have no idea how we handle that now. Should I make an issue for this? |
Looks good, thank you! Re translations: I don't think so, although I'm not sure myself what the process is (#1280). |
Fixes #1088.
I haven't really written any frontend code before, so I hope this isn't too bad.