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

Bump publiclab-editor from 2.1.2 to 2.2.0 #8297

Merged

Conversation

dependabot-preview[bot]
Copy link
Contributor

@dependabot-preview dependabot-preview bot commented Aug 14, 2020

Bumps publiclab-editor from 2.1.2 to 2.2.0.

Release notes

Sourced from publiclab-editor's releases.

Woofmark upgrades, Custom insert module, and many more improvements

This release incorporates a LOT of fixes as well as some new features. It builds on publiclab/PublicLab.Editor#557 however we have bumped up to v2.2.0 as there are new features included. Thanks to @NitinBhasneria @shreyaa-sharmaa @Shulammite-Aso @keshav234156 @sagarpreet-chadha @emilyashley and others for bringing things this far!!! Congrats, folks!

Published on NPM as well: https://www.npmjs.com/package/publiclab-editor

Fixes

  1. Popup Disappearing problem solved by @NitinBhasneria jywarren/woofmark#3
  2. Feature to change heading back into plain text by @shreyaa-sharmaa jywarren/woofmark#5
  3. Refine drag and drop events to prevent interference by @NitinBhasneria jywarren/woofmark#2
  4. fix bold texts loosing formatting after converting to markdown and back to wysiwyg by @Shulammite-Aso jywarren/woofmark#15

Features

  1. Added custom insert module by @keshav234156 publiclab/PublicLab.Editor#568
  2. ADDS: Feature to decenter text in wysiwyg and markdown modes by @shreyaa-s #521
  3. Add support for class attributes in links by @Shulammite-Aso publiclab/PublicLab.Editor#547
  4. Compact design for Main Image Module by @shreyaa-sharmaa #594

Changes

  1. Repoint woofmark to pull in fixes from latest plots2 branch of woofmark, https://github.com/jywarren/woofmark/tree/plots2
  2. Includes jest-puppeteer tests in woofmark by @Shulammite-Aso jywarren/woofmark#11
  3. Made history icons consistent in demo editor fixes by @Shulammite-Aso #571
  4. Main image box padding and background improvements by @NitinBhasneria #564
  5. "Remove file" button test added by @NitinBhasneria #574
  6. Redefines puppeteer as a dev dependency by @shreyaa-s #565
  7. Update dependencies in woofmark on plots2 branch by @Shulammite-Aso jywarren/woofmark#17
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the .dependabot/config.yml file in this repo:

  • Update frequency
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added dependencies Pull requests that update a dependency file JavaScript labels Aug 14, 2020
@gitpod-io
Copy link

gitpod-io bot commented Aug 14, 2020

@codecov
Copy link

codecov bot commented Aug 14, 2020

Codecov Report

Merging #8297 into main will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8297   +/-   ##
=======================================
  Coverage   81.27%   81.27%           
=======================================
  Files         101      101           
  Lines        5859     5859           
=======================================
  Hits         4762     4762           
  Misses       1097     1097           

@jywarren
Copy link
Member

Awesome!

@jywarren
Copy link
Member

Please give this a try in GitPod and confirm that it works, folks! Then let's merge!!!

@jywarren
Copy link
Member

jywarren commented Aug 14, 2020

I found I wasn't able to publish a post when testing it in GitPod -- can someone else try that out? Let's look at the Ruby and JS consoles to see what happened!

@Shulammite-Aso
Copy link
Collaborator

I found I wasn't able to publish -- can someone else try that out? Let's look at the Ruby and JS consoles to see what happened!

seeing the same too. And is this not the same code we have on stable? The Publish bar on stable is not responding for me, and the how many steps left counter is not changing too.

Copy link
Collaborator

@Shulammite-Aso Shulammite-Aso left a comment

Choose a reason for hiding this comment

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

Also noticed the tool bar needs a little adjustment too. Have seen what the issue is, i can either fix this, or make it an FTO issue?

The toolbar in rich mode starts floating from the foot of the 4th step instead of from the foot f the contenteditable div. This wasn't obvious in the editor example

@jywarren
Copy link
Member

seeing the same too. And is this not the same code we have on stable? The Publish bar on stable is not responding for me, and the how many steps left counter is not changing too.

Hmm, on https://stable.publiclab.org? This should have the same Ruby code, but not the same Editor code of course. That's no good, though! We may need to open a new priority issue for that. Do you see any Ruby error output in GitPod we can reference to trace this?

Also noticed the tool bar needs a little adjustment too. Have seen what the issue is, i can either fix this, or make it an FTO issue?

The toolbar in rich mode starts floating from the foot of the 4th step instead of from the foot f the contenteditable div. This wasn't obvious in the editor example

It would be great if you could open a PR directly for it, as we'll want to resolve that ASAP to get this release published. Thank you @Shulammite-Aso !!

@jywarren
Copy link
Member

jywarren commented Aug 18, 2020

OK, I'm going through this now carefully in GitPod and stable, checking:

Stable:

  • how many steps left works
  • publish button becomes enabled
  • posts can be published (seeing 500 error even without a lead image)

GitPod:

  • how many steps left works
  • publish button becomes enabled
  • posts can be published (seeing 500 error even without a lead image)

@jywarren
Copy link
Member

jywarren commented Aug 18, 2020

OK, 500 on /notes/create for both, but seems unrelated to lead image. Error is:

Started POST "/notes/create?rich=true" for 127.0.0.1 at 2020-08-18 15:18:05 +0000
Cannot render console from 10.138.0.70! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by NotesController#create as */*
  Parameters: {"title"=>"Test post", "body"=>"Test post here", "authenticity_token"=>"LajfRTt0XDB2TxV+ia+VHG9CMRCeXIC8nCMO4OlgGyOcpRsaEgEmxcdz4T4S8cKeiVQDhwG94uRX2YYpidrXEw==", "draft"=>"false", "tags"=>"", "has_main_image"=>"", "main_image"=>"", "node_images"=>"", "image"=>{"photo"=>""}, "rich"=>"true"}
DEPRECATION WARNING: This Authlogic configuration option (validates_format_of_login_field_options) is deprecated. Use normal
ActiveRecord validation instead. Detailed instructions:
https://github.com/binarylogic/authlogic/blob/master/doc/use_normal_rails_validation.md
 (called from block in <class:User> at /workspace/plots2/app/models/user.rb:38)
  �[1m�[36mUser Load (0.5ms)�[0m  �[1m�[34mSELECT  `rusers`.* FROM `rusers` WHERE `rusers`.`id` = 1 LIMIT 1�[0m
  �[1m�[35m (0.2ms)�[0m  �[1m�[35mBEGIN�[0m
  �[1m�[36mUser Update (0.4ms)�[0m  �[1m�[33mUPDATE `rusers` SET `last_request_at` = '2020-08-18 15:18:06', `updated_at` = '2020-08-18 15:18:06' WHERE `rusers`.`id` = 1�[0m
  �[1m�[35m (40.1ms)�[0m  �[1m�[35mCOMMIT�[0m
  �[1m�[36mUser Load (0.5ms)�[0m  �[1m�[34mSELECT  `rusers`.* FROM `rusers` WHERE `rusers`.`id` = 1 LIMIT 1�[0m
  �[1m�[35m (0.6ms)�[0m  �[1m�[34mSELECT COUNT(*) FROM `node` WHERE `node`.`uid` = 1 AND `node`.`type` = 'note' AND `node`.`status` = 1�[0m
  �[1m�[36mCACHE User Load (0.0ms)�[0m  �[1m�[34mSELECT  `rusers`.* FROM `rusers` WHERE `rusers`.`id` = 1 LIMIT 1�[0m  [["id", 1], ["LIMIT", 1]]
  �[1m�[36mCACHE User Load (0.0ms)�[0m  �[1m�[34mSELECT  `rusers`.* FROM `rusers` WHERE `rusers`.`id` = 1 LIMIT 1�[0m  [["id", 1], ["LIMIT", 1]]
  �[1m�[36mNode Load (0.6ms)�[0m  �[1m�[34mSELECT  `node`.* FROM `node` WHERE `node`.`path` = '/notes/admin/08-18-2020/test-post' ORDER BY `node`.`nid` ASC LIMIT 1�[0m
  �[1m�[35m (0.2ms)�[0m  �[1m�[35mBEGIN�[0m
  �[1m�[36mCACHE User Load (0.0ms)�[0m  �[1m�[34mSELECT  `rusers`.* FROM `rusers` WHERE `rusers`.`id` = 1 LIMIT 1�[0m  [["id", 1], ["LIMIT", 1]]
  �[1m�[36mCACHE Node Load (0.0ms)�[0m  �[1m�[34mSELECT  `node`.* FROM `node` WHERE `node`.`path` = '/notes/admin/08-18-2020/test-post' ORDER BY `node`.`nid` ASC LIMIT 1�[0m
  �[1m�[36mNode Create (0.7ms)�[0m  �[1m�[32mINSERT INTO `node` (`type`, `title`, `uid`, `changed`, `comment`, `path`, `slug`) VALUES ('note', 'Test post', 1, 1597763886, 2, '/notes/admin/08-18-2020/test-post', 'test-post')�[0m
  �[1m�[36mNode Update (0.4ms)�[0m  �[1m�[33mUPDATE `node` SET `created` = 1597763886 WHERE `node`.`nid` = 44�[0m
  �[1m�[36mRevision Create (2.8ms)�[0m  �[1m�[32mINSERT INTO `node_revisions` (`nid`, `uid`, `title`, `body`, `teaser`, `log`, `timestamp`, `format`) VALUES (44, 1, 'Test post', 'Test post here', '', '', 1597763886, 1)�[0m
  �[1m�[36mNode Load (0.4ms)�[0m  �[1m�[34mSELECT  `node`.* FROM `node` WHERE `node`.`nid` = 44 LIMIT 1�[0m
  �[1m�[36mNode Update All (0.4ms)�[0m  �[1m�[33mUPDATE `node` SET `drupal_node_revisions_count` = COALESCE(`drupal_node_revisions_count`, 0) + 1 WHERE `node`.`nid` = 44�[0m
  �[1m�[36mNode Update (0.4ms)�[0m  �[1m�[33mUPDATE `node` SET `vid` = 44 WHERE `node`.`nid` = 44�[0m
  �[1m�[35m (21.2ms)�[0m  �[1m�[31mROLLBACK�[0m
Completed 500 Internal Server Error in 1088ms (ActiveRecord: 85.4ms)

app/models/node.rb:224:in `notify'
app/models/node.rb:713:in `block in new_note'
app/models/node.rb:697:in `new_note'
app/controllers/notes_controller.rb:410:in `new_note'
app/controllers/notes_controller.rb:86:in `create'
  �[1m�[36mRevision Load (4.1ms)�[0m  �[1m�[34mSELECT  DISTINCT node_revisions.nid, node_revisions.body, node_revisions.title, MATCH(node_revisions.body, node_revisions.title) AGAINST('Test post' IN BOOLEAN MODE) AS score FROM `node_revisions` WHERE (MATCH(node_revisions.body, node_revisions.title) AGAINST('Test post' IN BOOLEAN MODE)) LIMIT 5�[0m
  �[1m�[36mNode Load (0.5ms)�[0m  �[1m�[34mSELECT `node`.* FROM `node` WHERE (`node`.`nid`) IN (8, 9, 10, 11, 12) AND `node`.`status` = 1 AND (`node`.`type` = 'note')�[0m
  �[1m�[35m (0.2ms)�[0m  �[1m�[35mBEGIN�[0m
  �[1m�[35m (0.2ms)�[0m  �[1m�[35mCOMMIT�[0m

Could it relate to SELECT DISTINCT ?

@jywarren
Copy link
Member

Aha. It's because it can't connect to Redis:

Redis::CannotConnectError in NotesController#create

Error connecting to Redis on 127.0.0.1:6379 (Errno::ECONNREFUSED)
Extracted source (around line #363):

#361            Errno::EINVAL
#362 
*363       raise CannotConnectError, "Error connecting to Redis on #{location} (#{$!.class})"
#364     end
#365 
#366     def ensure_connected

Extracted source (around line #344):

#342     end
#343 
*344     def establish_connection
#345       server = @connector.resolve.dup
#346 
#347       @options[:host] = server[:host]

Extracted source (around line #106):

#104       # Don't try to reconnect when the connection is fresh
#105       with_reconnect(false) do
*106         establish_connection
#107         call [:auth, password] if password
#108         call [:select, db] if db != 0
#109         call [:client, :setname, @options[:id]] if @options[:id]


Rails.root: /workspace/plots2

Application Trace
app/models/node.rb:224:in `notify'
app/models/node.rb:713:in `block in new_note'
app/models/node.rb:697:in `new_note'
app/controllers/notes_controller.rb:410:in `new_note'
app/controllers/notes_controller.rb:86:in `create'

I hope that means that this would work in production... checking...

@jywarren
Copy link
Member

Linking to enabling Redis in GitPod here: #8162

However, I think that we should fail gracefully if Redis isn't available. Checking how.

@jywarren
Copy link
Member

Update! The issue was different on stable: https://stable.publiclab.org/notes/warren/08-18-2020/test-post-1351 - it was a duplicate title Test post (haha). OK, so testing there again with a lead image. GitPod is still seeing Redis issue.

@jywarren
Copy link
Member

Image upload itself in the new editor seems to work fine in GitPod but not in stable. Just checking that and then I'll merge this!

@jywarren
Copy link
Member

ah ok confirmed that same missing image is happening for comment uploads on https://stable.publiclab.org/notes/warren/08-18-2020/test-post-1351 so unrelated. @icarito and I are debugging that... seems the image exists but is not being routed to. Probably doesn't affect production...

@jywarren
Copy link
Member

@dependabot rebase

@jywarren
Copy link
Member

Trying a rebase now that we ought to have Redis running in GitPod after #8317

@dependabot-preview dependabot-preview bot force-pushed the dependabot/npm_and_yarn/publiclab-editor-2.2.0 branch from 7e86b06 to 13877f8 Compare August 18, 2020 15:58
@jywarren
Copy link
Member

Confirmed images now working again on stable: https://stable.publiclab.org/notes/warren/08-18-2020/test-post-1351asdfasdfga

@jywarren
Copy link
Member

Testing in GitPod again post Redis fix...

@dependabot-preview dependabot-preview bot merged commit d1b9b9f into main Aug 18, 2020
@dependabot-preview dependabot-preview bot deleted the dependabot/npm_and_yarn/publiclab-editor-2.2.0 branch August 18, 2020 16:13
@jywarren
Copy link
Member

🎉 🎉 🎉 🎉 🎉

Thanks all! This was great. Sorry for the last minute unrelated issues but thanks for your patience.

@jywarren
Copy link
Member

https://stable.publiclab.org/post to test, then publishing to live site!

@jywarren
Copy link
Member

Works in GitPod too now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file JavaScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants