-
Notifications
You must be signed in to change notification settings - Fork 86
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
Made the KLogo component #460
Conversation
Signed-off-by: shivangrawat30 <[email protected]>
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'll leave approval to @thanksameeelian to be sure here, but I do question whether or not this should be a prop in this component or if we should instead make a separate KLogo
or something which uses KImg
without these changes rather than making the otherwise generic KImg
component configurable for one particular special purpose by a prop.
lib/KImg.vue
Outdated
@@ -14,6 +14,8 @@ | |||
|
|||
<script> | |||
|
|||
import kolibriLogo from '../docs/common/DocsPageTemplate/SideNav/kolibri-logo.svg'; |
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'm not sure if we should be linking to an SVG in the docs directory here. Perhaps it'd be worth copy-pasting it directly into the same directory as this file?
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.
Definitely would be good to copy it to KImg
/KLogo
directory
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 doubt that someone re-organizing docs code and pages would get an idea to check whether it broke something in library. So good to have strict separation.
lib/KImg.vue
Outdated
@@ -115,6 +124,9 @@ | |||
imgMinWidth() { | |||
return this.validateAndFormatUnits(this.minWidth); | |||
}, | |||
logo() { |
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.
Since the item being shown won't always be a "logo" maybe we can call this something like imgSrc
It was just a light-hearted issue we made with @akolson to conclude his project in a little silly way utilizing our LE slogan "Kolibri Fly!" :) I admit I didn't put much technical thinking into it. This PR follows the specification exactly #373, so the fault is on me. You're right that
Would that be okay? |
@MisRob I would appreciate the opportunity to improve it. Should I create a new file named |
Great, @ShivangRawat30, thanks for being open. Yes, it'd be a new component named @nucleogenesis Could you please provide some guidance to @ShivangRawat30 if he has some more questions? |
@MisRob @nucleogenesis Should I create a new folder specifically for images to house the |
@ShivangRawat30 you can make your new |
Signed-off-by: shivangrawat30 <[email protected]>
Signed-off-by: shivangrawat30 <[email protected]>
@nucleogenesis Please review the PR with the changes I've implemented. |
Wonderful @ShivangRawat30, and thanks for drafting the documentation page! I will leave the final review of this work on @thanksameeelian or @nucleogenesis. For now, only one high-level request - instead of You can just pass
|
Also, @radinamatic, when displaying our logo https://raw.githubusercontent.com/learningequality/kolibri-design-system/ff15d1a2d8a3ae82c61de82ede74caf8177a1c9d/lib/KLogo/kolibri-logo.svg, does it need to have alternative text or should it be empty? |
@MisRob Yes, alternative text for the logo image would be required. If the logo is used just as a flat image, the string |
@radinamatic Thank you. @ShivangRawat30 based on @radinamatic's comment, I'd then suggest different API for
You will then just send |
Signed-off-by: shivangrawat30 <[email protected]>
@MisRob I've made the suggested changes, please review it. |
Please note that |
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, @ShivangRawat30, this is starting to look great.
I added one note related to removing the logic that's duplicate of KImg
'es logic
Signed-off-by: shivangrawat30 <[email protected]>
@MisRob Done!! |
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.
Almost there @ShivangRawat30. Left you one comment. In KLogo
, there is no need for any duplicate of KImg
logic. We only need to keep things specific particular to KLogo
there (e.g. different alt text requirements)
Signed-off-by: shivangrawat30 <[email protected]>
Signed-off-by: shivangrawat30 <[email protected]>
Signed-off-by: shivangrawat30 <[email protected]>
Signed-off-by: shivangrawat30 <[email protected]>
Signed-off-by: shivangrawat30 <[email protected]>
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.
@ShivangRawat30 Thanks for all work here!
I pushed a commit to finalize the documentation page - finishing docs is something we don't require from contributors, so I organized it myself rather than writing review. It was primarily adjustments related to organization and conventions we use. Your draft was very helpful and saved us time, thank you.
On that opportunity I also pushed a small cleanup to KLogo
itself, primarily using required
instead of throwing a custom warning (it's a different situation from KImg
's warning).
You're welcome to ask any questions and I can elaborate more if there's something you're interested in.
I will update changelog next week and merge.
@radinamatic I used some of your alt text notes for the usage section in the docs |
docs/pages/klogo.vue
Outdated
<DocsPageSection title="Usage" anchor="#usage"> | ||
<h3>Alternative text</h3> | ||
|
||
<p>Alternative text (<code>altText</code>) is always required for the logo image. When creating it, consider the following:</p> |
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.
Looking good @MisRob, I'd just suggest to remove 'always', as in the wide world logos are not absolutely required to have alternative text. They can also be used for decorative purposes, but I'm unaware we are using ours that way anywhere in Kolibri. In our case just 'required' should suffice.
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.
Alright, will do before merging. Thank you
@MisRob I greatly appreciate your help related to the PR, and I'm eager to make further contributions to the codebase. Please consider assigning me more issues as I'm enthusiastic about resolving them. |
You're welcome, @ShivangRawat30! We welcome contributions, and I think there are some free "help wanted" or "good first issue" issues here in this repository or in Kolibri or Studio. Let us know if you've found something suitable. |
Description
This PR Adds
KLogo
Issue addressed
Addresses #373
Steps to test
(optional) Implementation notes
At a high level, how did you implement this?
Does this introduce any tech-debt items?
Testing checklist
changelog
Reviewer guidance
Comments