-
Notifications
You must be signed in to change notification settings - Fork 123
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
Implement src attribute for popovers #1780
Conversation
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.
Great job!
One slight clarification:
Does the src allows for both a html page URL and a markdown file (just like the include mechanism)?
If so perhaps we could mention both and give one example each.
Also there's a conflict due to the latest PR merge.
PS. one more question in mind:
Just curious, does the importing of content from an external URL leads to a potential XSS attack, or has it already been handled accordingly?
@tlylt Thanks for looking through!
Yup! Good idea, I'll add it to the docs
Fixed, thanks for the catch :)
By external URL, do you mean something like |
Ok, I think I had the wrong impression that the src could be any URL to an HTML page on the web but I think it doesn't seem to be the case. Hence maybe it's not that necessary to give any warnings at the moment. |
Thanks for the work, @jovyntls ! Review is underway.
Let's discuss about the priority list. Just my 2 cents, how about if we put It's a little bit unintuitive to think |
@ryoarmanda |
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.
Okay then, we can set the priority as discussed. In the meantime, here are some improvements that can be made for your implementation (the tests and docs reviews are to be done later when the implementation is solid). Feel free to address this alongside modifying the priority :)
P.S. don't forget to sync with master!
+ `Missing reference in ${context.cwf}`); | ||
logger.error(error); | ||
|
||
actualContent = cheerio.html(createErrorNode(node, error)); |
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 way, the error node I think would be in the tooltip content 😄 (let me know if this is correct and/or intended). If not, we can adopt the way to replace the node with error node like in the above lines and early return.
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.
Thank you so much for the detailed look-through @ryoarmanda ! I've made the changes and re-synced with master. |
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.
Thanks for the follow up! Here are some reviews that we can work on:
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.
Thanks for addressing the review! The implementation is pretty solid (with one very minor change below) and all that's left is coming up with the tests and cleaning up the documentation 😄
Thanks again @ryoarmanda for the detailed lookthrough! I've made the changes mentioned, and also made an additional change to packages/vue-components/README.md since I realised it hadn't been updated yet. |
@tlylt Thanks for the catch! You're right, |
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.
Just some little documentation nits before ready to approve!
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.
LGTM! 🎉
Hi @jovyntls , before I merge the changes, let's add more information to the commit message, as this is a considerable popover enhancement. |
Thanks for the reminder @ryoarmanda ! I've updated the commit message to include more information. |
What is the purpose of this pull request?
Resolves #59
Overview of changes:
Implements the src attribute in popovers, which allows popover contents to be loaded from other files.
Anything you'd like to highlight / discuss:
content
slotsrc
attributecontent
attributesrc
attribute should override content slots in this case?Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Checklist: ☑️