-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Adding bootstrap-markdown editor #6551
Conversation
options.onPreview = previewCallback; | ||
} | ||
else{ | ||
options.disabledButtons = ["cmdPreview"] |
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.
Missing semicolon.
@jhass: I'm having a problem with the asset pipeline on this: Do you know where it comes from? |
This would be pretty awesome if you can pull it off! The markdown variant seems like the correct one, though I the preview should probably be disabled since it probably wont be able to render all the codes diaspora supports? And we already have a preview. This would especially help new users to settle in who have never heard about markdown. |
I plan to use our rendering engine. One can sepcify a rendering function.
Yep, and it would clearly easier markdown formatting on mobile. |
I think my problem could be related to this. Since there seems to be no way to prevent bundler to perform dependency resolution, I'll try the solution in the last answer tonight. |
@@ -2,6 +2,10 @@ | |||
# licensed under the Affero General Public License version 3 or later. See | |||
# the COPYRIGHT file. | |||
|
|||
Rails.configuration.assets.paths.reject! do |path| | |||
path.include?('rails-assets-bootstrap') && !path.include?('rails-assets-bootstrap-markdown') |
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.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
So this looks like an attempt to solve #5801. Is this conform to what we said there, == a publisher close to what github does (a write tab, not wisiwig, and a preview tab)? |
Yup! :) |
Nothing against a preview tab, but these buttons always look so clunky and messy :/ |
@@ -2,6 +2,10 @@ | |||
# licensed under the Affero General Public License version 3 or later. See | |||
# the COPYRIGHT file. | |||
|
|||
Rails.configuration.assets.paths.reject! do |path| |
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.
Please add a comment explaining this hack.
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.
Sure. Ninja commit from work ;)
Also make sure to render the preview with our existing markdown-it pipeline, if it uses a different renderer it's useless. |
Nothing to worry, preview will be rendered with our engine. |
Will be great if you can get this working! Just a thought, to save visual clutter and space, could you have the format icons spaced along a single bar rather than each being in a button? Something like this: It might even be best to merge this bar with the notification about using Markdown, to save space. I'd also suggest streamlining the new preview function with the existing one. There was discussion before about changing the preview button to a tab, which seems a good idea to me - but whether or not you decide to tackle that in this PR, I don't think there's a need for a second preview button. Thanks for your work! |
That looks great, goob! I agree that a simple formatting bar might do the On Wed, Nov 18, 2015 at 1:03 PM, goob [email protected] wrote:
|
I thought about doing this. But I fear it could be controversial.
Yep, that's planned ;)
Current existing one will be annihilated! >:D #6537 will have to get merged before I can continue working on the preview function. |
Here is a design proposition based on what @goobertron proposed: I don't really like it. I find it messy and I fear about the risks of misclick. Particularly on a mobile phone. |
I would prefer to see the buttons at the bottom to not distract the user, but we then need a way to clearly differentiate what is markdown insert and what is post addition (polls, picture, location). |
I can't choose that, unhopefully. Besides, Having the formatting buttons at the top pretty a standard. |
I have to agree with Jonne at
Idea: One could use the "Markdown" link that's already there to trigger the editor to load. |
My opinion is that it has to be easy for inexperimented users first. So buttons have to be displayed by default. |
I agree our default should be "common" users. Or have a setting to switch the default. But default for new users should be to show the buttons. |
Let's first see if we can make the buttons as subtle and integrated as possible. If that's still too much for used users, then we'll see what we can do :) |
"Common users", at least on Geraspora, do not use any formatting but only publish plain text posts. ;) |
Maybe they don't know how to format posts. |
Here is how I see the publisher (note that the images have a width of 650px so the mockups work on all screens): First proposition:Second proposition:About the second proposition:
|
Nope, @Flaburgan, your proposition won't be possible. I can't just place the buttons where I want because they are created by the plugin. So, the way it goes, I'd have to... rewrite the plugin. Plus, I explained that small buttons like on your mocks causes huge risks on misclick. |
@AugierLe42e my mockups describe how the publisher can look like, they don't include any technical constraint. And I think we should first imagine and design what would be the best, and then see what are the technical limitations. |
So, maybe that's not the right place ;) |
Yeah I should have created them when I opened #5801 but now it looks like this PR is an attempt to close this issue (thanks for that!) so I post them here. We already have a preview button and we use our own render engine. So to not use the plugin to do that seems fine for me. I don't think my proposed design adds a lot more work ;) |
@@ -63,10 +63,19 @@ | |||
#main_stream .stream_element { | |||
padding: 10px; |
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.
You also added padding: 10px;
to the .stream_element
rule so I guess you can remove this here.
I'm able to reproduce it with Firefox 48 and Firefox Developer (50.0a2 (2016-08-05)):
|
Adding bootstrap-markdown editor
Thank you! 👍 |
Wow, thank you @AugierLe42e! A major UI improvement. |
Thank you @goobertron 😄 |
Adding Bootstrap Markdown editor to publisher.