-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adds image button to wiki Editor #8252
Conversation
Thanks for opening this pull request! This space is protected by our Code of Conduct - and we're here to help. |
Codecov Report
@@ Coverage Diff @@
## main #8252 +/- ##
==========================================
+ Coverage 81.27% 81.98% +0.71%
==========================================
Files 101 101
Lines 5859 5902 +43
==========================================
+ Hits 4762 4839 +77
+ Misses 1097 1063 -34
|
Exciting! Actually i wonder if we could do something a little simpler, i left a comment here! #8241 (comment) Thank you so much @shreyaa-sharmaa !! |
I'm thinking it could be related to @NitinBhasneria's work here! #8240 |
@jywarren its done. 🎉 |
I've also made a small changes to the toolbar so we can combine it with #8259. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can restrict the format of files uploaded using https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept . We donot want users to upload pdf,docs,etc., right?
Also after uploading multiple images, how does the user knows which image will be rendered where? Can you attach a screenshot of this case?
Thanks 🎉
@sagarpreet-chadha I've added the condition for file upload. Should I change it to We can upload one file at a time (similar to how we did it before) and thus the selected picture would come one after the other based on order of addition. |
This sounds like a great plan, @shreyaa-sharmaa ! Let's do it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @shreyaa-sharmaa , let's support all the images format. Then this PR is good to go 🎉
a0fa967
to
4dc37b0
Compare
This is not ready to be merger yet. |
OK, no rush, just tell us when you'd like to get this added in! Much appreciated!! |
app/assets/stylesheets/editor.css
Outdated
@@ -160,39 +160,10 @@ version of the editor is released. */ | |||
resize: vertical; | |||
} | |||
|
|||
#imagebar { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shreyaa-sharmaa -- actually, we'd like to keep the image upload bar as well, so we have both. Will that be possible? Thank you! I'm sorry i missed this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do that.
Yeah, I misunderstood how adding an image in the post worked. But I've figured it out now. Sorry it's taking so long. I'll try to get it done asap. |
This is almost done. I just need to ask about the placement of the progress bar. Should we have a progress bar below the textarea or to the right of it (same as that of main image)? |
The progress bar as @jywarren advises looks good! |
I believe this is for inline image additions, not for the lead image, though, which is what @ebarry is highlighting. Thanks though, it's good context! |
The original code for progress-bar for inline images doesn't work. I tried to use one similar to the comment boxes (noting here that the same function triggers progress bar in both these cases) but that didn't work as well. Right now I'm tracking it down. I'll hopefully get it done by tomorrow. Anyone here has any idea why the original one doesn't work? 😕 |
Hmm, i'm sorry you're having trouble! The original code presumably works in a couple other contexts still, like the comment box. I think it was complicated because it was intended to be re-used code for various contexts. Where is it failing? Could it be due to css selectors not being specific enough? |
I believe this is complete now. Please have a look @jywarren @sagarpreet-chadha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fantastic. Thank you so much, @shreyaa-sharmaa for bringing this to the finish line!!! 👍 🎉
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
* initial commit * test fix * toolbar repositioning * interface improvement * removing the insert image modal * bootstrap fixes * file upload condition * changed condition to accept all image types * redifined structure for image upload * added imagebar * css fixes * refactored code * code climate issue fixed
Fixes #8241, fixes #8259
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test
@publiclab/reviewers
for help, in a comment belowIf 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!