#63 Notify user when trying to create a lesson with no notes#103
#63 Notify user when trying to create a lesson with no notes#103edXmO wants to merge 3 commits intojrobind:masterfrom
Conversation
jrobind
left a comment
There was a problem hiding this comment.
Thanks for this, hope you're well! Glad to have you back contributing 😄
It's looking good! I've left some comments mainly regarding whether we should just stick with the native HTML tooltip validation? Either way, we want to keep your tooltip CSS code because we will need this going forward.
Ideally, once the CSS has been refactored into SCSS we would have a tooltip component so we could reuse this code there.
Let me know your thoughts!
| flex: 1; | ||
| } | ||
|
|
||
| span.create-lesson-input-tooltip::after { |
There was a problem hiding this comment.
I wonder if maybe we're better off sticking with the native HTML form validation? i.e. by using the required attribute. I think this code is still useful though and we shouldn't remove it. We will need tooltips at some point (we probably need them for the lesson tags).
Because we have some positioning issues on smaller screen sizes I wonder if we just leave the native HTML validation tooltip to do its job. What do you think?
There was a problem hiding this comment.
Sure I think that's the best option. I'll remove everything but the CSS code in regards to the custom tooltip and fix the issue with the required attribute instead.
| placeholder="Lesson title" | ||
| required | ||
| /> | ||
| <span id="title-tooltip"></span> |
There was a problem hiding this comment.
If we decided to remove the tooltip for the form validation we can keep the CSS but just remove the logic and markup for it.
| tag.classList.contains("selected") | ||
| ); | ||
|
|
||
| if (lessonTitle === "") { |
There was a problem hiding this comment.
This check could also be !lessonTitle
|
|
||
| input.create-lesson-input { | ||
| .create-lesson-input-invalid { | ||
| outline: none; |
There was a problem hiding this comment.
This is fine, but when setting borders it can cause some layout shifting. box-sizing: border-box; means that padding and border are included in the width and height of an element. We could try using outline instead and see how that looks? I haven't tested it so it might look terrible.
There was a problem hiding this comment.
I'll test it out maybe it does look better.
|
Also, I forgot to mention, in future can you please create a new branch before raising a pull request. If you need some guidance, please follow the process outlined in this article: https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github Thanks 😃 |
Sure, I'll create a new branch when addressing issues. Sorry for the inconvenience. |
Thanks! No need to set up a new branch for these changes, just remember for future PR's 😄 |
Hi ! It's been a while, I'm sorry for not working on this before. I've been quite busy but found some time today and got something done.
I think that's all for now, I'll be around to fix the changes on the positioning if needed. Thanks!