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

Improved deep/full copying logic to address errors and provide user feedback #225

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

hogpilot
Copy link
Collaborator

Lots of new code here which will require thorough review and testing. It should throttle deep copying to limit asynchronous requests to 5 simultaneous (a sweet spot found during my testing). There are a few other improvements in here for CSS, addItem typo (from way back), a notification window with a copy progress bar, and a warning if the user tries to close/leave the page while copying is in progress.

I think this may fix #224 #215 #210 #172

@@ -20,6 +21,28 @@ require([
Clipboard
) {

var unsaved = {};
var isDirty = function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Comments on new functions would be helpful in explaining their role.

display: flex;
}

#itemsArea {
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 compelling reason for hard-coding layout sizes instead of using the responsive elements in Bootstrap?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, the primary reason is because Bootstrap's grid system presents 2 challenges for our UI:

  1. At certain page widths (the most common from what I've seen), Bootstrap's grid system places a margin on the left/right side of the main content area (centered) and leaves a fair amount of space left unavailable. This is particularly relevant with regards to JSON viewing/editing. The new code removes this unused space.
  2. The Bootstrap grid framework defaults to a float implementation when screen size is reduced (i.e. to a typical mobile size) which either causes the right #dropArea to float down (below the #itemArea , and thus become unreachable) or makes either column unusable because the column elements are too small. It also causes the navbar to grow in height and thus cover up the top portion of either content columns.

Basically, there are lots of issues with our UI/UX css currently, and these changes are meant to address some of them before we get to the point where we can look at a full UI refresh down the road.

Copy link
Contributor

@ecaldwell ecaldwell Nov 21, 2017

Choose a reason for hiding this comment

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

The layout changes you're proposing will have implications across the entire app. They should be broken out to a separate branch and PR so we can have a more focused discussion on those specific changes.

Regarding your comments, screenshots would really be helpful. Both 1 and 2 should be addressable by making better use of Bootstrap's media breakpoints. I'm not opposed to migrating away from those in favor of something else as long as it provides flexibility and responsiveness. Hardcoded css rules make both of those harder.

@ecaldwell
Copy link
Contributor

...addItem typo (from way back)

I went through this one with @slibby trying to trace the origin. The same property shows up on this method in several other apps and scripts. It's certainly possible that I inadvertently copied the code between them all, but I have a different theory. I believe it is not a typo, but rather that the API spec changed at some point. This would explain why the method works fine as is (just with some unintended side-effects on the back end).

This is a good example of why detailed (and versioned) API documentation is needed. Ideally, Esri can start detailing API changes with each release. Github's developer blog is a particularly good example of how to do this well.

…eld names must be all lower case 2) Layer ID of destination doesn't necessarily match the ID of the source. This commit incorporates fixes for both scenarios.
…it had been created). Addding missing images to fix 404s
@slibby
Copy link
Member

slibby commented Mar 13, 2018

@ecaldwell are you ok with a 'don't let the perfect be the enemy of good' if we can address the CSS issues?

@ecaldwell
Copy link
Contributor

@slibby Yep...the hardcoded CSS rules in this PR are my primary concern. The other functionality looked good the last time I put eyes on this.

@slibby
Copy link
Member

slibby commented May 10, 2019

@hogpilot do you think this is still good to merge? A lot of time has passed but as I recall at the time it was working quite well.

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.

Issues in addItem call when copying web maps and apps
3 participants