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

699: Fix issue with dismissing warnings would create a "duplicate" entry #717

Merged
merged 3 commits into from Jun 6, 2017

Conversation

Projects
None yet
3 participants
@toolstack
Contributor

toolstack commented May 10, 2017

Resolves #699.

@toolstack toolstack requested a review from ocean90 May 10, 2017

@toolstack toolstack added this to the 2.4 milestone May 10, 2017

Show outdated Hide outdated assets/js/editor.js
@@ -321,6 +322,7 @@ $gp.editor = (
success: function( data ) {
$gp.notices.success( 'Saved!' );
$gp.editor.replace_current( data );
$gp.editor.next();

This comment has been minimized.

@ocean90

ocean90 May 30, 2017

Member

Jumping to the next editor is a bad idea because 1) a translation can have more than one warning (see #370) and 2) a translation can be in a pending state.

In both steps you'd have to re-open the previous editor for further status changes, that sounds like a step backward to me.

@ocean90

ocean90 May 30, 2017

Member

Jumping to the next editor is a bad idea because 1) a translation can have more than one warning (see #370) and 2) a translation can be in a pending state.

In both steps you'd have to re-open the previous editor for further status changes, that sounds like a step backward to me.

This comment has been minimized.

@toolstack

toolstack May 31, 2017

Contributor

There were two reasons I added the next(), first was that it called the right logic to display things correctly and second was to keep consistent with how other actions in the editor work (any time you it save, cancel, set a status, etc. the editor moves to the next entry).

I can see though in this case that may not be the desired outcome so I've updated the PR and removed some logic that was based on the assumption that whenever replace_current() was called that the preview would be visible (the old logic was a little redundant all things considered).

@toolstack

toolstack May 31, 2017

Contributor

There were two reasons I added the next(), first was that it called the right logic to display things correctly and second was to keep consistent with how other actions in the editor work (any time you it save, cancel, set a status, etc. the editor moves to the next entry).

I can see though in this case that may not be the desired outcome so I've updated the PR and removed some logic that was based on the assumption that whenever replace_current() was called that the preview would be visible (the old logic was a little redundant all things considered).

@ocean90

ocean90 approved these changes Jun 6, 2017

@ocean90 ocean90 removed the bug label Jun 6, 2017

@ocean90 ocean90 merged commit ad132d8 into develop Jun 6, 2017

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@garrett-eclipse

This comment has been minimized.

Show comment
Hide comment

garrett-eclipse commented Jun 6, 2017

Thanks @ocean90 and @toolstack

@toolstack toolstack deleted the 699-discarding-warning-duplicate-entry branch Jun 6, 2017

@toolstack toolstack modified the milestones: 3.0, 2.4 Aug 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment