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

Editor: offer the option to convert to HTML on invalid blocks #2807

Merged
merged 1 commit into from Sep 28, 2017

Conversation

Projects
None yet
4 participants
@youknowriad
Contributor

youknowriad commented Sep 27, 2017

This PR adds a way to convert to a simple HTML block on invalid blocks.
This also fixes the invalid warning buttons (it was not possible for me to click the buttons)

This will help move forward with #2794

Screenshots

screen shot 2017-09-27 at 10 10 22

Testing instructions

  • Edit a block in the text mode and make it invalid
  • Get back to the visual mode
  • Click the "convert to HTML"
  • The broken HTML should be kept and the block converted to an HTML block
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Sep 27, 2017

Codecov Report

Merging #2807 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2807      +/-   ##
=========================================
- Coverage   33.81%   33.8%   -0.02%     
=========================================
  Files         190     190              
  Lines        5678    5680       +2     
  Branches      992     992              
=========================================
  Hits         1920    1920              
- Misses       3181    3183       +2     
  Partials      577     577
Impacted Files Coverage Δ
...ditor/modes/visual-editor/invalid-block-warning.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a949b7...765428a. Read the comment docs.

codecov bot commented Sep 27, 2017

Codecov Report

Merging #2807 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2807      +/-   ##
=========================================
- Coverage   33.81%   33.8%   -0.02%     
=========================================
  Files         190     190              
  Lines        5678    5680       +2     
  Branches      992     992              
=========================================
  Hits         1920    1920              
- Misses       3181    3183       +2     
  Partials      577     577
Impacted Files Coverage Δ
...ditor/modes/visual-editor/invalid-block-warning.js 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a949b7...765428a. Read the comment docs.

@jasmussen

This comment has been minimized.

Show comment
Hide comment
@jasmussen

jasmussen Sep 27, 2017

Contributor

Works stellarly 👍 👍

I think @mtias had some thoughts on how this dialog could be slightly redesigned. In such a redesign it would be good to explore making those buttons smaller. Perhaps "Convert" becomes a dropdown or something.

Contributor

jasmussen commented Sep 27, 2017

Works stellarly 👍 👍

I think @mtias had some thoughts on how this dialog could be slightly redesigned. In such a redesign it would be good to explore making those buttons smaller. Perhaps "Convert" becomes a dropdown or something.

@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Sep 27, 2017

Contributor

Yes, I was thinking we could move the dialog/warning to the top of the block (where the toolbar lives) instead of over the block. That way you could see the actual content better to make a more informed decision. And it might allow us to show you a before/after too in the future.

Contributor

mtias commented Sep 27, 2017

Yes, I was thinking we could move the dialog/warning to the top of the block (where the toolbar lives) instead of over the block. That way you could see the actual content better to make a more informed decision. And it might allow us to show you a before/after too in the future.

@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Sep 27, 2017

Contributor

One suggestion for the button label: "Edit as HTML block".

Contributor

mtias commented Sep 27, 2017

One suggestion for the button label: "Edit as HTML block".

@mtias

mtias approved these changes Sep 27, 2017

@youknowriad youknowriad merged commit eb5f014 into master Sep 28, 2017

3 checks passed

codecov/project 33.8% (-0.02%) compared to 5a949b7
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@youknowriad youknowriad deleted the update/invalid-block-warning branch Sep 28, 2017

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