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

integrate At.js autocompletion into rich editor for tagnames and emoji #7526

Merged
merged 5 commits into from May 4, 2021

Conversation

keshav234156
Copy link
Member

Fixes publiclab/PublicLab.Editor#365

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@keshav234156 keshav234156 requested a review from a team as a code owner February 17, 2020 16:21
@welcome
Copy link

welcome bot commented Feb 17, 2020

Thanks for opening this pull request! This space is protected by our Code of Conduct - and we're here to help.
Dangerbot will test out your code and reply in a bit with some pointers and requests.
Also please refer here for installation help 💿
There may be some errors, but don't worry! We'll work through them with you! 👍🎉😄
It would be great if you can tell us your Twitter handle so we can thank you properly?

@keshav234156
Copy link
Member Author

keshav234156 commented Feb 17, 2020

@jywarren @VladimirMikulic the instructions mentioned in https://github.com/publiclab/PublicLab.Editor#atwhojs-data-module didn't seem to integrate the autocomplete in pl.org.Any additional changes that you think are needed ?

@codecov
Copy link

codecov bot commented Feb 17, 2020

Codecov Report

❗ No coverage uploaded for pull request base (main@4e52e2e). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 96a8c78 differs from pull request most recent head 7363740. Consider uploading reports for the commit 7363740 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #7526   +/-   ##
=======================================
  Coverage        ?   43.30%           
=======================================
  Files           ?       98           
  Lines           ?     6225           
  Branches        ?        0           
=======================================
  Hits            ?     2696           
  Misses          ?     3529           
  Partials        ?        0           

@keshav234156
Copy link
Member Author

@niravasher

@plotsbot
Copy link
Collaborator

1 Warning
⚠️ There was an error with Danger bot’s Junit parsing: No JUnit file was found at output.xml
4 Messages
📖 @keshav234156 Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 This pull request doesn’t link to a issue number. Please refer to the issue it fixes (if any) in the body of your PR, in the format: Fixes #123.
📖 It looks like you haven’t marked all the checkboxes. Help us review and accept your suggested changes by going through the steps one by one. If it is still a ‘Work in progress’, please include ‘[WIP]’ in the title.
📖 #
Screenshots 📸 (click to expand)

7526-test_questions.png

7526-test_embeddable_grids.png

7526-test_signup.png

7526-test_viewing_the_settings_page.png

7526-test_tag_by_author_page.png

7526-test_wiki_page_with_inline_grids.png

7526-test_stats.png

7526-test_viewing_the_dashboard.png

7526-test_searching_an_item_from_the_homepage.png

7526-test_signup_modal_form_validation.png

7526-test_tag_stats.png

7526-test_login_modal_form_validation.png

7526-test_questions_shadow.png

7526-test_login_modal.png

7526-test_profile_page.png

7526-failures_test_posting_from_the_editor.png

7526-test_comments.png

7526-test_tags.png

7526-test_signup_modal.png

7526-test_wiki.png

7526-test_methods.png

7526-test_tag_page.png

7526-test_blog_page_with_location_modal.png

7526-test_tag_wildcard.png

7526-test_signup_modal_disabled_submit_button_on_empty_username.png

7526-test_embeddable_thumbnail_grids.png

7526-test_front_page_with_navbar_search_autocomplete.png

7526-test_spam_moderation_page.png

7526-test_login.png

7526-test_viewing_the_dropdown_menu.png

7526-test_viewing_question_post.png

7526-test_mobile_displays.png

7526-failures_test_main_textarea_image_drag_and_drop_upload.png

7526-test_simple-data-grapher_powertag.png

7526-test_front.png

7526-test_question_page.png

7526-test_tag_contributors_page.png

7526-test_blog.png

7526-failures_test_changing_and_reverting_versions_works_correctly_for_wiki.png

7526-test_people.png

7526-test_wiki_revisions.png

Learn about automated screenshots

Generated by 🚫 Danger

@jywarren jywarren changed the base branch from master to main June 30, 2020 18:06
@cesswairimu
Copy link
Collaborator

cesswairimu commented Sep 18, 2020

Is this by any chance related to #8248 ? If so could we please align and maintain one PR. Thanks

@cesswairimu
Copy link
Collaborator

@sagarpreet-chadha could you please help with reviewing this. Thanks

@gitpod-io
Copy link

gitpod-io bot commented Apr 15, 2021

@jywarren
Copy link
Member

Let's see how this does... i think we need to rebase?

@jywarren
Copy link
Member

jywarren commented May 4, 2021

OK, i'm seeing:

===============[Screenshot]: tmp/screenshots/failures_test_post_note,_then_comment_on_FRESH_note.png
ERROR CommentTest#test_post_note,_then_comment_on_FRESH_note (523.75s)
Minitest::UnexpectedError:         ActionController::RoutingError: No route matches [GET] "/lib/publiclab-editor/data/emoji.js"
            /home/runner/work/plots2/plots2/vendor/bundle/ruby/2.6.0/gems/actionpack-5.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
2021-04-15 21:19:01 +0000 Rack app ("GET /lib/publiclab-editor/data/atwho.PLE.js" - (127.0.0.1)): #<ActionController::RoutingError: No route matches [GET] "/lib/publiclab-editor/data/atwho.PLE.js">
======[Screenshot]: tmp/screenshots/failures_test_posting_from_the_editor.png
ERROR PostTest#test_posting_from_the_editor (213.64s)
Minitest::UnexpectedError:         ActionController::RoutingError: No route matches [GET] "/lib/publiclab-editor/node_modules/at.js/dist/css/jquery.atwho.min.css"

So we're missing:

  • /lib/publiclab-editor/data/emoji.js
  • /lib/publiclab-editor/node_modules/at.js/dist/css/jquery.atwho.min.css

@gitpod-io
Copy link

gitpod-io bot commented May 4, 2021

@jywarren
Copy link
Member

jywarren commented May 4, 2021

Fixed some CSS and JS paths!!!

@jywarren
Copy link
Member

jywarren commented May 4, 2021

Ooohhhhhh! Testing in GitPod!!

@jywarren
Copy link
Member

jywarren commented May 4, 2021

Hmmmmm. OK this doesn't work in GitPod. I wonder if the option is getting set correctly?

https://github.com/publiclab/PublicLab.Editor/pull/48/files

@codeclimate
Copy link

codeclimate bot commented May 4, 2021

Code Climate has analyzed commit 7363740 and detected 0 issues on this pull request.

View more on Code Climate.

@jywarren jywarren merged commit 6233398 into publiclab:main May 4, 2021
@jywarren
Copy link
Member

jywarren commented May 4, 2021

Woohoo!!!

@jywarren jywarren changed the title integrate editor n plots2 integrate At.js autocompletion into rich editor for tagnames and emoji May 11, 2021
$('.wk-wysiwyg')
.atwho(hashtags_config)
.atwho(emojis_config)
//.atwho(at_config) // off for performance reasons for now
Copy link
Member

Choose a reason for hiding this comment

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

@TildaDares here it is! This is where I turned off the username autocompletion. It uses the same API backend as your code. But the front-end implementation may be a little different as it's within a rich text editor!

reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* integrate editor n plots2

* Fixed relative paths to required JS and CSS files

* tweaks/fixes

* working; usernames off for performance

Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* integrate editor n plots2

* Fixed relative paths to required JS and CSS files

* tweaks/fixes

* working; usernames off for performance

Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
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.

Integrate autocompletion code into plots2 codebase
4 participants