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

Uploading preview adjustments #241

Merged
merged 2 commits into from
Sep 13, 2016

Conversation

flamerohr
Copy link
Contributor

@flamerohr flamerohr commented Sep 2, 2016

fixes #221

Also fixes:

  • preview image size (was always blown up)
  • overlay "view" showing for upload preview, which doesn't do anything.
  • Added missing unit tests (incomplete, missing image loading unit test)
  • handleAddedFile returns a promise, so it can be chained for unit testing (and if the caller wants to chain something else)

Found new issue Gallery.handleCancelUpload() is broken

@helpfulrobot
Copy link

@flamerohr, thanks for your PR! By analyzing the blame information on this pull request, I identified @chillu, @clarkepaul and @sminnee to be potential reviewers

@flamerohr flamerohr force-pushed the pulls/4.0/upload-preview branch 2 times, most recently from 3a31447 to 29677b1 Compare September 2, 2016 01:59
@@ -154,13 +154,17 @@ class GalleryItem extends SilverStripeComponent {
return this.props.item.exists;
}

uploading() {
Copy link
Member

Choose a reason for hiding this comment

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

Masking a prop in a trivial getter seems unnecessary here - it just makes the code harder to read. What's the rationale for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intent was that the exists() function was already in place and I was originally tweaking that function instead.
Turned out it needed splitting out and I had found it easier to read this.uploading() alongside this.exists() as opposed to mixing this.props.uploading with this.exists()

Copy link
Member

Choose a reason for hiding this comment

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

Yep, makes sense

@chillu
Copy link
Member

chillu commented Sep 13, 2016

Uploading preview adjustments (fixes #221)

Feedback on commit message: You can leave out the URL if its on the same repo, so this should be:

Uploading preview adjustments (fixes #221)

Also, careful with line length on commit message first lines - it should be less than 100 chars or so, otherwise most git repo browsers (like github) will cut it

@chillu chillu force-pushed the pulls/4.0/upload-preview branch from d119c05 to 27ef3be Compare September 13, 2016 01:39
@chillu
Copy link
Member

chillu commented Sep 13, 2016

Rebased on master and force pushed.

@chillu chillu merged commit 16fe5e0 into silverstripe:master Sep 13, 2016
@chillu chillu deleted the pulls/4.0/upload-preview branch September 13, 2016 01:40
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.

3 participants