-
Notifications
You must be signed in to change notification settings - Fork 336
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
Markdown in OutcomeCards! #640
Conversation
Add CircleCI 2.0 beta
Huzzah! |
Hey, you're really getting somewhere! Nice work so far! There are a few things we'll need to work out, aesthetically and interaction-wise:
What other things should we think about? |
Everything should work properly now, just need to add the proper styles... |
Jinx! |
Styles:
I think enter to submit should definitely stay and we should also add support for ctrl+enter (right now only shift+enter is supported) |
Awesome! Keep going. Excellent work thus far. |
@jordanh @ackernaut @mattkrick Most of the styling and logic should be done now :) Just need to style any img tags within the markdown content to have max-width: 100% but I can't figure out the syntax :( In other words how would you do this:
|
testing with this markdown: |
@ndey96 this is looking good! Exciting! A couple of notes on styling:
|
As I said before, great work on this so far. Before you move onto another issue, can you please offer a checklist of what you think needs to get done before you merge? I'll respond with a check-listed test plan. When we've checked off the items on both lists, we should be good to merge. Thank you! |
Here is what I think needs to be done before a merge:
Nice to haves:
|
Ooh I like your list @ndey96 ! I'll pull down and take a gander. And here is a note: It occurred to me last night what the UI design spec is that I would like to see for card content: If a user only uses text (no MD formatting) then the textarea and the content should look the same in terms of typography (line-height, font-size) and layout/gutters (padding). Hover states highlight the editable area, simply editing text results in no change of spacing. If a user does add formatting then we can expect the editing state to look different than the final state. I'm going to test against this spec, and see how it holds up! |
Ok @ndey96 got 4 demos coming atcha! Action card, production Project card, production You will notice a difference in hover states and text formatting. I would like to retain the seamless feel of the production state for cards, meaning only cards with formatting would have a different output than when editing. I would also like to retain the same hover states (with the borders, etc.) unless we iterate on that styling. I believe we were using transparent top and bottom borders in order to keep the height the same as when hovering. |
Also, note that the highlight (hover state) coloring is different for action and project cards. |
Test planIt should:
|
@ackernaut would you mind giving this a test and some feedback today? |
Taking a gander now. |
This is coming along very nicely! I checked off a few tests: 1) autofocus new cards 2) render on tab, on blur 3) links open in new tab 4) images do not overflow As for 5) disallowing the pasting of raw html—when I paste HTML it just renders as text, so it allows pasting, but has no effect. Does that pass? A few other notes:
Overall, impressed with the quick progress on this!! 👾 |
@ackernaut I believe html should be escaped and render as plain text so we don't use dangerouslySetInnerHTML which could open us up to XSS. right @jordanh ? Also new checklist:
|
Yes, html should be escaped. I believe it's working correctly the way you've got it configured now. I like you're new checklist! Once you made your updates, I'll test again! |
@jordanh @ackernaut Updates made :) Thanks again for the feedback! |
@ndey96 looking good! 1) hover/editing styles are in place 2) newline 🐛 is bye bye! |
This comment has many newlines and a link |
line line |
The Action list form feels funny with out being able to submit on enter.
@@ -60,7 +59,7 @@ class UserActionListItem extends Component { | |||
<Field | |||
name={actionId} | |||
component={OutcomeCardTextarea} | |||
doFocus={!content} | |||
doSubmitOnEnter |
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.
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.
So the pro user will shift enter
to break new lines?
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.
I think that’ll work!
import React, {PropTypes} from 'react'; | ||
|
||
const LinkNewTab = (props) => { | ||
const { children, href, title } = props; |
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.
@ndey96 I removed the URL-helping here. It didn't sit well with me web-standards wise, and also, GitHub doesn't do any helping so I don't think we should either.
Let's use this is a starting point and if we need to grow something more ornate because our users are struggling, we will.
@mattkrick I think this is good to go, at least well enough for some testing on staging. Would you give the code a once over and also execute the following tests? Test planIt should:
|
So I can still reproduce, at random, cards where the hover state gets stuck. Sometimes it happens with I copy the contents of one card and go to paste into another card or action item. Working on a screen capture, and reliable steps. However I think this can be captured as bug and not necessarily block merge (unless there is an easy fix!). |
So many times it will happen on a first interaction (since I've left the tab and returned) but when I turn on the screen recording the bug decides to hide from me! Haha. So look at :24 of :30 in this screen recording: I select the content of the card then go to add it to an action item. The hover state sticks and persists. I have to finally go hover on and off after having created an action item. Is this some type of race condition on mouse movement and rendering life cycle? |
PS. I realize that I need a space between the |
@ackernaut yeah, the hover state business is odd. Looking into the code, the interaction is driven in places above these changes. I think it's possible this bug was pre-existing. @mattkrick is it ok if I merge this PR? Or, would you like me to delay until you've had a chance to look? I'd like to put it up on staging... |
This PR is meant to address #300
Opening it early. As of now, editing existing outcome cards is supported. Now just gotta work on editing new ones 💯