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

Disable Drag & Drop Upload on the Image Toolbar Button #9118

Merged
merged 8 commits into from
Feb 4, 2021

Conversation

noi5e
Copy link
Contributor

@noi5e noi5e commented Feb 2, 2021

103472308-f5ae0400-4d40-11eb-8d18-88099b4addfd

Small change: This PR disables drag & drop onto A in the above image.

It seems unintentional that user would be able to drop an image onto the image upload button. Most users probably don't expect to be able to do this. I think it's a good idea to take away this functionality. Because it leads to unintended user behavior, which we would have to write system tests for, guard against, etc.

(FYI Both A and B have the class .dropzone.)


(This issue is part of the larger Comment Editor Overhaul Project with Outreachy. Refer to Planning Issue #9069 for more context)

@noi5e noi5e requested review from a team as code owners February 2, 2021 23:49
@gitpod-io
Copy link

gitpod-io bot commented Feb 2, 2021

@codecov
Copy link

codecov bot commented Feb 2, 2021

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #9118   +/-   ##
=======================================
  Coverage        ?   82.00%           
=======================================
  Files           ?      100           
  Lines           ?     5931           
  Branches        ?        0           
=======================================
  Hits            ?     4864           
  Misses          ?     1067           
  Partials        ?        0           

@noi5e noi5e added feature explains that the issue is to add a new feature JavaScript outreachy and removed feature explains that the issue is to add a new feature labels Feb 3, 2021
@noi5e
Copy link
Contributor Author

noi5e commented Feb 3, 2021

Ready to merge! Merge these before this one (in order)

  1. refactor editor.js with object-oriented principles Refactor editor.js with Object-Oriented Principles #9104
  2. rewrite $E.setState for single ID parameter Rewrite $E.setState for Single ID Parameter #9107
  3. prune editor state management Prune Editor State Management #9108
  4. refactor editor constructor with new parameter; write editor getters Refactor Editor Constructor and Methods, Write Editor Getters #9110
  5. remove functionality for DRAG onto edit form's .dropzone to upload image Disable Drag & Drop Upload on the Image Toolbar Button #9118

The above list is also present at my planning issue #9069

Copy link
Collaborator

@cesswairimu cesswairimu left a comment

Choose a reason for hiding this comment

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

Suberb 🎉 🎉 Thanks @noi5e

@cesswairimu
Copy link
Collaborator

Hi @noi5e ping me to merge once you resolve the conflicts, really glad we have this weird behavior removed 🚀 thanks

@codeclimate
Copy link

codeclimate bot commented Feb 4, 2021

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

View more on Code Climate.

@noi5e
Copy link
Contributor Author

noi5e commented Feb 4, 2021

@cesswairimu Thank you for the review!! Ready to merge again, tests passing!

@cesswairimu
Copy link
Collaborator

Awesome 🎉

@cesswairimu cesswairimu merged commit f015f8f into publiclab:main Feb 4, 2021
@noi5e noi5e deleted the disable-small-dropzone-dragNdrop branch February 4, 2021 17:54
jywarren pushed a commit that referenced this pull request Feb 4, 2021
* merge branches #9104 #9107 #9108 #9110 #9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test
jywarren pushed a commit that referenced this pull request Feb 6, 2021
* merge branches #9104 #9107 #9108 #9110 #9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test

* add text-input class, data-form-id attribute to textarea #9004 #9131

* add data-form-id to save & recover buttons #9004 #9131

* E.setState when clicking save, recover, & .text-input #9004 #9131

* refactor save & recover #9004 #9131

* add icon to recover button #9004 #9131

* restore edit button tooltip #9004 #9131

* save with window.location.pathname, not href #9004 #9131

* new system test for save & recover #9004 #9131

* update test selector #9004 #9131
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* merge comment editor refactor branches publiclab#9004

* add classes for small and large dropzones

* disable drag&drop on image upload button

* add data-form-ID attribute to large dropzone

* update selectors for large dropzone
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test

* add text-input class, data-form-id attribute to textarea publiclab#9004 publiclab#9131

* add data-form-id to save & recover buttons publiclab#9004 publiclab#9131

* E.setState when clicking save, recover, & .text-input publiclab#9004 publiclab#9131

* refactor save & recover publiclab#9004 publiclab#9131

* add icon to recover button publiclab#9004 publiclab#9131

* restore edit button tooltip publiclab#9004 publiclab#9131

* save with window.location.pathname, not href publiclab#9004 publiclab#9131

* new system test for save & recover publiclab#9004 publiclab#9131

* update test selector publiclab#9004 publiclab#9131
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* merge comment editor refactor branches publiclab#9004

* add classes for small and large dropzones

* disable drag&drop on image upload button

* add data-form-ID attribute to large dropzone

* update selectors for large dropzone
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test

* add text-input class, data-form-id attribute to textarea publiclab#9004 publiclab#9131

* add data-form-id to save & recover buttons publiclab#9004 publiclab#9131

* E.setState when clicking save, recover, & .text-input publiclab#9004 publiclab#9131

* refactor save & recover publiclab#9004 publiclab#9131

* add icon to recover button publiclab#9004 publiclab#9131

* restore edit button tooltip publiclab#9004 publiclab#9131

* save with window.location.pathname, not href publiclab#9004 publiclab#9131

* new system test for save & recover publiclab#9004 publiclab#9131

* update test selector publiclab#9004 publiclab#9131
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* merge comment editor refactor branches publiclab#9004

* add classes for small and large dropzones

* disable drag&drop on image upload button

* add data-form-ID attribute to large dropzone

* update selectors for large dropzone
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test

* add text-input class, data-form-id attribute to textarea publiclab#9004 publiclab#9131

* add data-form-id to save & recover buttons publiclab#9004 publiclab#9131

* E.setState when clicking save, recover, & .text-input publiclab#9004 publiclab#9131

* refactor save & recover publiclab#9004 publiclab#9131

* add icon to recover button publiclab#9004 publiclab#9131

* restore edit button tooltip publiclab#9004 publiclab#9131

* save with window.location.pathname, not href publiclab#9004 publiclab#9131

* new system test for save & recover publiclab#9004 publiclab#9131

* update test selector publiclab#9004 publiclab#9131
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* merge comment editor refactor branches publiclab#9004

* add classes for small and large dropzones

* disable drag&drop on image upload button

* add data-form-ID attribute to large dropzone

* update selectors for large dropzone
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* merge branches publiclab#9104 publiclab#9107 publiclab#9108 publiclab#9110 publiclab#9118

* change #dropzone-large ID to #comment-form-body

* add comprehensive preview button test

* add text-input class, data-form-id attribute to textarea publiclab#9004 publiclab#9131

* add data-form-id to save & recover buttons publiclab#9004 publiclab#9131

* E.setState when clicking save, recover, & .text-input publiclab#9004 publiclab#9131

* refactor save & recover publiclab#9004 publiclab#9131

* add icon to recover button publiclab#9004 publiclab#9131

* restore edit button tooltip publiclab#9004 publiclab#9131

* save with window.location.pathname, not href publiclab#9004 publiclab#9131

* new system test for save & recover publiclab#9004 publiclab#9131

* update test selector publiclab#9004 publiclab#9131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants