Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Fix #2129, notify user when full page is cut off #3550

Merged
merged 1 commit into from
Sep 28, 2017
Merged

Conversation

ianb
Copy link
Contributor

@ianb ianb commented Sep 26, 2017

Adds a new captureType, fullPageTruncated

Looks like this:

image

@ianb
Copy link
Contributor Author

ianb commented Sep 26, 2017

Or with silly scales:

image

@ianb
Copy link
Contributor Author

ianb commented Sep 26, 2017

new font size:

image

Copy link
Member

@jaredhirsch jaredhirsch left a comment

Choose a reason for hiding this comment

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

R+ with lots of minor comments

@@ -402,6 +402,20 @@ $very-light-grey: #ededed;
width: 400px;
}

#imageCroppedWarning {
background: rgba(0,0,0,.8);
Copy link
Member

Choose a reason for hiding this comment

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

Could you specify the opacity separately? Seems to make Windows High Contrast mode behave in a more reasonable way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think you can make the background opacity separate, only the entire element opacity...?

shared/shot.js Outdated
@@ -707,7 +707,7 @@ class _Clip {
}
assert(checkObject(image, ["url"], ["dimensions", "text", "location", "captureType", "type"]), "Bad attrs for Clip Image:", Object.keys(image));
assert(isValidClipImageUrl(image.url), "Bad Clip image URL:", image.url);
assert(image.captureType == "madeSelection" || image.captureType == "selection" || image.captureType == "visible" || image.captureType == "auto" || image.captureType == "fullPage" || !image.captureType, "Bad image.captureType:", image.captureType);
assert(image.captureType == "madeSelection" || image.captureType == "selection" || image.captureType == "visible" || image.captureType == "auto" || image.captureType == "fullPage" || image.captureType == "fullPageTruncated" || !image.captureType, "Bad image.captureType:", image.captureType);
Copy link
Member

Choose a reason for hiding this comment

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

this line is looking awfully long

@@ -16,6 +16,8 @@ notificationLinkCopiedTitle = Link Copied
# modifier key used in the shortcut (do not translate it): for example, Ctrl-V
# on Windows systems.
notificationLinkCopiedDetails = The link to your shot has been copied to the clipboard. Press {meta_key}-V to paste.
# This is displayed as a warning when a Full Page save will be cropped
Copy link
Member

Choose a reason for hiding this comment

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

Could also mention that {pixels} is a placeholder for a plural whole number, like 5000.

@@ -160,22 +160,28 @@ this.uicontrol = (function() {
},
onClickFullPage: () => {
sendEvent("capture-full-page", "selection-button");
captureType = 'fullPage';
Copy link
Member

Choose a reason for hiding this comment

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

y u no double quotes in this file?

text-align: center;
width: 100%;
z-index: 2;
position: absolute;
Copy link
Member

Choose a reason for hiding this comment

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

repeated CSS property

@@ -16,6 +16,8 @@ notificationLinkCopiedTitle = Link Copied
# modifier key used in the shortcut (do not translate it): for example, Ctrl-V
# on Windows systems.
notificationLinkCopiedDetails = The link to your shot has been copied to the clipboard. Press {meta_key}-V to paste.
# This is displayed as a warning when a Full Page save will be cropped
imageCroppedWarning = This image has been cropped to {pixels} pixels.
Copy link
Member

Choose a reason for hiding this comment

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

Should the string be, "This image will be cropped to {pixels} pixels" ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you're using "pixel", you should use a proper plural form. The easy way out is to use px.
http://projectfluent.io/fluent/guide/selectors.html

Also CC @stasm to make sure we don't break anything if you go for proper plural.

Copy link
Member

Choose a reason for hiding this comment

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

@flodolo In this case the singular will never be needed, so I'm not sure I see the need for the extra selector syntax

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@johngruen said "px", but I thought that encouraged a term that a normal human wouldn't know so I switched to pixels.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Once again, stop using your English brain to think ;-)

one vs many is not a plural form, it's something that works in a bunch of languages
https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Use_proper_plural_forms

@jaredhirsch
Copy link
Member

@ianb Also, this might be a good time to bump the limit to 10k pixels (#3538)

@ianb
Copy link
Contributor Author

ianb commented Sep 26, 2017

This is for uplift to 57, so I think in a meeting we decided not to mess with anything unnecessarily (like the pixel limit)

Adds a new captureType, fullPageTruncated
@ianb ianb dismissed jaredhirsch’s stale review September 28, 2017 19:54

review comments addressed

@ianb ianb merged commit 268bd48 into master Sep 28, 2017
@ianb ianb deleted the image-crop-warning branch September 28, 2017 19:54
@justfortherec
Copy link

This is for uplift to 57

This sounds like this change is supposed to be in Firefox 57 but I cannot see the message.

Before filing a bug because of truncated full page screenshots I found this change. I cannot see the message in Firefox 57 on Ubuntu. Should I file a bug or will this be available in a future release?

@chenba
Copy link
Collaborator

chenba commented Nov 28, 2017

@justfortherec It will be in a future release.

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

Successfully merging this pull request may close these issues.

5 participants