Summary:
Ref T2641. Currently, we scale images to fit horizontally, but let them have arbitrary vertical size. This is nice in theory but kind of sucks in practice because it makes everything below the stage jump around when you switch images. It would also make swiping through images on mobile super weird.
Instead, scale to fit in both dimensions. This feels a lot better and more application-like to me. (I also think most mocks are not especially tall?)
Test Plan:
{F34648}
(Note that the image is enormous.)
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2641
Differential Revision: https://secure.phabricator.com/D5233
Summary:
Ref T2644. This isn't perfect, but makes Pholio more-or-less usable on mobile. In particular:
- Inline comments drop below the image.
- Clicking the image lightboxes a full size version so you can scroll around it and inspect details.
- Clicking it again dismisses it.
Things that aren't good:
- Can't add inline comments. This seems complicated and not critical.
- Can't easily figure out which inline comments go where since there's no hover. Maybe let you tap them? Not sure if we really need this.
- Thumbs are between image and image data. I'm planning to get rid of the thumbs and do swipe left/right instead.
- It would be nice to scroll the lightbox to center on the part of the image you tapped. I just thought of this, though.
Test Plan:
{F34640}
{F34641}
{F34642}
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2644
Differential Revision: https://secure.phabricator.com/D5232
Summary: I broke the code which shows which thumb is currently selected when I made the URLs fancy, by changing the container from `div` to `a`.
Test Plan: Verified current thumb is now highlighted.
Reviewers: chad
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5231
Summary:
Fixes T2669.
- Currently, making an inline comment does not focus the textarea. Instead, focus the textarea.
- Currently, the positioning is kind of buggy. Make it viewport-relative and put the dialog slightly below the inline reticle.
- Use `JX.Workflow` more and simplify some of the ajax stuff.
Test Plan: Created inline comments.
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2669
Differential Revision: https://secure.phabricator.com/D5229
Summary:
Some recent CSS change tweaked these out a bit. They were also sort of weird looking after fixing the double-draw thing:
- Make them work properly;
- make the implementation a bit simpler;
- make them clearer visually.
Also fix a bug where "border" and "fill" were accidentally reversed.
Test Plan:
{F34625}
(The highlight on the reticle is a little hard to pick out in the screenshot, but very obvious in practice.)
Reviewers: chad
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5228
Summary: Currently, if you click and drag in the checkered background, we'll create a 1px-wide or 1px-tall inline comment. Don't start inlines unless the user clicks on the image itself.
Test Plan: Clicked on and off the image.
Reviewers: chad
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5227
Summary: Fixes T2646. Title and description are placeholders. Styles on this are a bit rough.
Test Plan: {F34623}
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2646
Differential Revision: https://secure.phabricator.com/D5226
Summary: Fixes T2658. Map `/Mxx/yy/` to images in a mock. Use HTML5 history stuff to make it work nicely. This also makes right-click-open-in-new-tab work correctly.
Test Plan: Clicked thumbs in a mock. Right-clicked thumbs. Copy and pasted a URI. Used browser back button.
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2658
Differential Revision: https://secure.phabricator.com/D5222
Summary: Fixes T2657. Adds j/k for previous/next image. This is consistent with Differential. We could add left/right later but it needs a little work to make those available.
Test Plan: Mashed j/k, saw images switch.
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2657
Differential Revision: https://secure.phabricator.com/D5220
Summary:
Fixes T2643. Show a loading state (currently just making the image transparent, but we could do something fancier) when an image is loading.
Fixes T2648. Cleans up the double draws we were previously doing.
Makes thumbnails react to mousedown in addition to click so they feel a little snappier. Make them stop reacting to control click, command click, etc.
Test Plan: Used `setTimeout()` to simulate a 1s image load delay, switched between images.
Reviewers: chad
Reviewed By: chad
CC: aran
Maniphest Tasks: T2643, T2648
Differential Revision: https://secure.phabricator.com/D5219
Summary:
Highlight thumb for image user is currently viewing.
Highlight selection when user mouseovers it's inline(on side).
Test Plan: {F33990}
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D5134
Summary:
- For images that aren't too large to fit, keep the stage at about 85% of the viewport height. This prevents it from bouncing around as you switch between images, and generally makes it feel big and important like it should. When the stage is larger than images, we center them vertically.
- As the viewport is resized, shrink the stage and, if necessary, the images on it.
Test Plan:
{F33617}
{F33618}
Reviewers: chad, ljalonen
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5089
Summary:
Currently, if an image is too wide for the viewport, we freak out. Instead, scale it down.
This means we must also scale down all the rectangles on it, which is why this is tricky. However, all the draw/load separation has made it reasonably straightforward.
We'll possibly need to add some kind of "view full size" thing. I'm planning to add an element which shows "85%" or whatever if it's currently scaled.
Test Plan:
Before:
{F33607}
After:
{F33608}
Reviewers: chad, ljalonen
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5088
Summary:
Currently, we draw the selection immediately after it changes. Instead, update state and then draw out of state.
Also simplify and clean up a few things. Make all the inline endpoints return data in the same format.
Test Plan: Made various inline comments.
Reviewers: chad, ljalonen
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5085
Summary: `image` has been replaced with `active_image`. `imageData` is from a long time ago, I think.
Test Plan: Verified nothing seems to be broken.
Reviewers: chad, ljalonen
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5084
Summary:
Currently, we issue one Ajax request to get inline comments, and then draw them when they come back. This has some limitations:
- A user could quickly click image 1, and then click image 2. The request for image 1 may take longer to come back than image 2. In this case, we'd draw the image 2 inlines and then draw the image 1 inlines when that request arrived, resulting in image 2 shown with both image 1 and image 2 comments. This is hard to make happen in a sandbox because the requests are so fast, but prevent it by drawing only the currently visible image's inlines.
- Every time we want to draw inlines, we need to request them -- even if we've already loaded them! This allows us to draw them without reloading them (although we don't actually do this, yet). When we do, it will make it faster to switch between images you've aleady looked at (and we can do other optimizations).
Test Plan: Clicked between images, saw inlines draw correctly. Added a new inline. Moused over inlines.
Reviewers: chad, ljalonen
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5083
Summary:
- Currently, we register this behavior every time we load comments. Instead, register it once.
- We have two very similar behaviors for over/out. Just use one that does the right thing based on the event type.
Test Plan: Waved my mouse over areas of the image with reticles, saw the correct comments highlight.
Reviewers: chad, ljalonen
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5082
Summary:
Currently, we use two different methods to draw Mock main images:
- When the page first loads, we draw the image on the server with PHP.
- When the user clicks a thumbnail, we draw the image on the client with JS.
Since we can't reasonably get rid of the client version of this, move it all to the client. This paves the way for some future features, like:
- Doing some magic with stage sizing
- URIs that jump to a specific comment
- showing "loading" indicators while images are loading
- Loading lowsrc images first?
Test Plan: Loaded page, clicked thumbs.
Reviewers: ljalonen, chad
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D5073
Summary: Show editor when user clicks edit button for inline comment.
Test Plan: Verified that editor is shown.
Reviewers: epriestley
CC: aran, Korvin
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D5030
Summary:
Rendering of inline comments has now been moved to PholioInlineCommentView controller.
Delete almost deletes and edit... well not so much, but replaced google.fi with amazing popup.
Test Plan: Verified that inline comments still show up. Verified that delete almost deletes.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D4994
Conflicts:
src/applications/pholio/controller/PholioInlineController.php
Summary:
Show drafts for users that made them.
Show inline comments beside image, highlights them when user mouseovers selection.
Allow users that can view mock to add inline comment instead of only allowing users that can edit mock to add inline comment.
Test Plan:
Verified that inline comments are shown beside image. Verified that only drafts for current user are shown. Verified that inline comment is
highlithed when user mouseovers their selection.
Reviewers: epriestley
CC: aran, Korvin
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D4929
Summary: Saved inline comments are now shown for images.
Test Plan: Verified that inline comments are loaded and shown.
Reviewers: epriestley
CC: aran, Korvin
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D4866
Summary:
The selection reticle in Pholio is functional but not very pretty right now. Make it look a little nicer.
- Using `box-sizing: border-box;` allows us to get rid of the `x - 1` and `y - 2` stuff.
- I draw the reticle with two elements: one mostly-transparent which creates a fill, and one fully opaque to create a strong dashed border.
Test Plan: {F31803}
Reviewers: ljalonen, chad
Reviewed By: chad
CC: aran, kchr
Differential Revision: https://secure.phabricator.com/D4836
Summary: Comment draft is now saved
Test Plan: Verified that draft is saved
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D4831
Summary: Applied fixes for issues mentioned in D4737#1&2
Test Plan: Verified that scripts seem to work as intended.
Reviewers: epriestley
CC: aran, Korvin
Maniphest Tasks: T2446
Differential Revision: https://secure.phabricator.com/D4782
Summary: Mock page now shows all images. Switching between images is done by clicking thumbnails.
Test Plan: Verified that all images are shown. Verified that by clicking thumbnail the image clicked will show.
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, AnhNhan
Maniphest Tasks: T2427
Differential Revision: https://secure.phabricator.com/D4698