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

[possible bug] Page Editing strange behaviour #129

Closed
bsusala opened this issue May 3, 2016 · 10 comments

Comments

Projects
None yet
4 participants
@bsusala
Copy link

commented May 3, 2016

Tried twice, think is consistently behaving:

  • open Page1
  • open Editor on Page 1
  • leave Editor window open
  • change to another Page2 in Preview, using actual links
  • in Customizer, Back
  • now both pages are listed
  • click on the other Page2
  • Editor window still open, with text from Page1
  • make any edit, Save
  • Content from Page1 saves to Page2
    Not good :)
@westonruter

This comment has been minimized.

Copy link
Contributor

commented May 3, 2016

It's hard to follow from the steps you listed. Could you create a screencast?

@bsusala

This comment has been minimized.

Copy link
Author

commented May 3, 2016

Tried again on a live, stripped down test site, the above behaviour does not replicate. Tried again on my local dev, the above reproduced until changing page inside Preview. TWO pages listed for editing, but Edit window retracts and when clicking for edit the second one, it loads the correct 2nd text. Very strange. Cannot publicly post a screencast, if you want I will send a PM, no problem.

[Later Edit]: The above Two Pages simultaneously listed for editing in Customizer happen only if Save button is not clicked between edits. If Save is clicked, then only one active Page (current one) is correctly listed.

@westonruter

This comment has been minimized.

Copy link
Contributor

commented May 3, 2016

Are you on WordPress Slack? You can DM me a link to your screencast there.

@westonruter westonruter added the bug label May 3, 2016

@westonruter

This comment has been minimized.

Copy link
Contributor

commented May 4, 2016

@bsusala Thanks for the screencast and additional information on Slack. You noted in Slack:

the "bug" is that if I do not save, there are two pages available for editing, which is more or less a UX "bug". not so critical, after all

And from your screencast the issue as I see it there is:

  • You navigate to a page in the Customizer preview
  • You open the “Pages” panel and see the one page there listed as expected.
  • You open this page section to edit the page.
  • You navigate to another page in the preview.
  • The previous page's Customizer section is still displayed.

Issue: The Customizer section for the previous page you were editing is still displayed. If you navigate back to the Pages panel, you see two pages listed. You're saying that you expect the previous section for a page to collapse when you navigate to another page in the preview? Or rather, you expect the Customizer section for the newly-navigated page to be automatically focused when navigating to a page?

@bsusala

This comment has been minimized.

Copy link
Author

commented May 4, 2016

After reviewing the behaviour, neither :)

I am in favor of a more consistent UI. So:

CONTEXT

  • editing in Customizer is, in my opinion, smth to be made after some minimal structure is in place, including static Pages
  • using Customizer, in its early stage, doesn't require content editing, but more global settings
  • when it's time to fine tune structure/content, navigating is more often done in Preview, rather than mingling in Customizer sections; so your Plugin should be Preview-centric, rather than Customizer-Sections-centric; all in all, your plugin is actually content focused, and content must be assessed in context (=Preview)
  • links in Preview can lead to Pages, Posts or external resources, or CPTs, or other
  • filtering them automatically in Customizer sections I think is possible (or not? I am not fluent enough to be certain)
  • if I am in the Pages or Posts Section, I am expecting to Edit that - ie prior clicking on a type of object I am trying to edit is not relevant

SUGGESTION

  • flush current categories (Pages/Posts/Forms), create a [NEW NAME TBD] Section for this plugin functionality
  • whatever EDITABLE (supported) object is in Preview, will show the respective editing options ready to operate (except for Editor - its behaviour is absolutely ok and smart); context feedback will say "Editing [Page/Post/whatever]"
  • resources lacking support for EDITING, yet, will show a message: "Not Editable, please do smth."
  • when navigating away from current Preview:
    -- if content modified, some message to Save/Quit
    -- if nothing modified, close anything specific (Editor, section), refresh Section content according to new Object in Preview

Hope I wasn't rambling and be of some use with my ideas. I still have to debug why on my localdev, text from one page got saved on another page while navigating through Preview (initial issue). Will get back to that once I figure it out.

@bsusala

This comment has been minimized.

Copy link
Author

commented May 5, 2016

related: #105 (comment)

@jwold

This comment has been minimized.

Copy link

commented Jul 12, 2016

@bsusala do you have the editor opened in html mode or visual mode?

@bsusala

This comment has been minimized.

Copy link
Author

commented Jul 12, 2016

@jwold if I remember correctly, it was in visual, since at the time, the plugin creates a standard TinyMCE instance. But since then, I wasn't able to reproduce the above initial possible bug behaviour.

@sayedtaqui

This comment has been minimized.

Copy link
Collaborator

commented Jul 19, 2016

@westonruter I checked, editor.setContent does not do anything when text tab is selected.
https://github.com/xwp/wp-customize-posts/blob/develop/js/customize-post-section.js#L563
so the text just stays there, but doesn't get updated in tinymce
This issue is very similar to the issue discussed here,
If I do editor.save( { no_events: true } ); after editor.setContent it works however the problem is that it wraps the text in p tag. Looking for a solution..

@westonruter

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2016

Fixed in #198.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.