-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Navigation]: adds Navigation component #450
Conversation
5a6d92e
to
20b3d6f
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-10-26 01:39:52.003110682 +0000
+++ ./tokens/css/variables.css 2023-10-26 01:39:04.970807681 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Oct 25 2023 21:15:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Thu Oct 26 2023 01:39:04 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
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.
Looks nice!
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-10-26 14:35:05.171382735 +0000
+++ ./tokens/css/variables.css 2023-10-26 14:34:27.771175611 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Oct 25 2023 21:15:08 GMT+0000 (Coordinated Universal Time)
+ * Generated on Thu Oct 26 2023 14:34:27 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
76a4a32
to
c729d27
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-02 02:55:45.492408002 +0000
+++ ./tokens/css/variables.css 2023-11-02 02:55:12.164395947 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Thu Nov 02 2023 00:18:57 GMT+0000 (Coordinated Universal Time)
+ * Generated on Thu Nov 02 2023 02:55:12 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
c729d27
to
6dfb887
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-06 21:51:32.382007127 +0000
+++ ./tokens/css/variables.css 2023-11-06 21:51:06.466114288 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Sun Nov 05 2023 20:24:20 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Nov 06 2023 21:51:06 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
f0660f2
to
8271eca
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-13 15:39:22.771525983 +0000
+++ ./tokens/css/variables.css 2023-11-13 15:38:56.179806046 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 13 2023 00:29:48 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Nov 13 2023 15:38:56 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
8271eca
to
d594371
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-17 19:24:17.401228121 +0000
+++ ./tokens/css/variables.css 2023-11-17 19:23:50.944983752 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Fri Nov 17 2023 00:59:55 GMT+0000 (Coordinated Universal Time)
+ * Generated on Fri Nov 17 2023 19:23:50 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
d594371
to
648cb22
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-27 18:12:47.103199282 +0000
+++ ./tokens/css/variables.css 2023-11-27 18:12:20.590975298 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 27 2023 16:25:03 GMT+0000 (Coordinated Universal Time)
+ * Generated on Mon Nov 27 2023 18:12:20 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
isCurrent = window.location.pathname === href | ||
} | ||
|
||
$: tag = href ? 'a' : ('button' as 'a' | 'button') |
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 is inexplicably broken when using with web components.
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.
Broken because custom elements doesn't seem to like the double <svelte:elements>
bit.
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.
Svelte is a bit funky :/
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.
To clarify, it's not broken in Svelte, but it is broken in WC land. Oh WC... 🙄
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'd like to merge and ignore this, though, as we don't have an immediate WC use case, but we do need it in a current Svelte project.
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.
Hmm okay. It does make me feel a little weird landing it without working WC support, as a lot of the usages for these components are in Brave Core, which is solely WC based.
That said, I want to unblock you, so I guess we can land as is, if you're okay to come back and try and fix it when you have some time?
I'd prefer to avoid a situation where we have a bunch of functionality which only works in Svelte, and a bunch which only works in WCs.
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 investigating a bit further, and it's almost as if the reactivity of href
is lost when nested.
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-29 23:27:04.382575166 +0000
+++ ./tokens/css/variables.css 2023-11-29 23:26:37.446711396 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 27 2023 16:25:03 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Nov 29 2023 23:26:37 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-30 18:51:15.275809417 +0000
+++ ./tokens/css/variables.css 2023-11-30 18:50:47.955909381 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 27 2023 16:25:03 GMT+0000 (Coordinated Universal Time)
+ * Generated on Thu Nov 30 2023 18:50:47 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-11-30 19:04:57.933146008 +0000
+++ ./tokens/css/variables.css 2023-11-30 19:04:31.789250390 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 27 2023 16:25:03 GMT+0000 (Coordinated Universal Time)
+ * Generated on Thu Nov 30 2023 19:04:31 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
b574065
to
ba9c605
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-12-01 04:10:20.654625834 +0000
+++ ./tokens/css/variables.css 2023-12-01 04:09:54.126628767 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 27 2023 16:25:03 GMT+0000 (Coordinated Universal Time)
+ * Generated on Fri Dec 01 2023 04:09:54 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-12-01 04:14:59.470553444 +0000
+++ ./tokens/css/variables.css 2023-12-01 04:14:32.642477546 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 27 2023 16:25:03 GMT+0000 (Coordinated Universal Time)
+ * Generated on Fri Dec 01 2023 04:14:32 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-12-01 04:23:03.350963786 +0000
+++ ./tokens/css/variables.css 2023-12-01 04:22:36.414775654 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Nov 27 2023 16:25:03 GMT+0000 (Coordinated Universal Time)
+ * Generated on Fri Dec 01 2023 04:22:36 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
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
title="Components/Navigation" | ||
component={Navigation} | ||
argTypes={{ | ||
kind: { |
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.
We should probably list all the args here (including CSS 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.
The navigation component itself doesn't have any CSS props. Some of the sub components have more props/CSS props, but I'm not sure that we'd want to add them here?
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.
Hmmm, that's a good point. It'd be good to have some way to figure out all the different knobs for the component, but I guess we can do that separately.
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 maybe less familiar with Storybook than you are. Are there standard ways of handling this kind of thing?
@@ -0,0 +1,25 @@ | |||
<script lang="ts"> | |||
let isSubnav = $$props.slot === 'subnav' |
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.
ooooh nice! Does this work in WebComponents land?
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.
No, but that's what this is for: https://github.com/brave/leo/pull/450/files#diff-57281b32d31843b9f8f3688b85aeb8d876a8d64057458e54a349300fc7ae8a8aR20
This reverts commit 686d407.
cb874b1
to
e7e4e0c
Compare
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-12-06 23:30:42.644314374 +0000
+++ ./tokens/css/variables.css 2023-12-06 23:30:15.336321167 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Dec 06 2023 19:57:56 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Dec 06 2023 23:30:15 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-12-06 23:35:24.066594622 +0000
+++ ./tokens/css/variables.css 2023-12-06 23:34:57.198626608 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Dec 06 2023 19:57:56 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Dec 06 2023 23:34:57 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
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 don't want to block you (any more than I already have 😆), so I'm approving. It'd be great if we could get this into a state where it works in WebComponents & Svelte though.
Apart from that, this looks great!
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://450.pr.nala.bravesoftware.com/ Variables Diff--- ./tokens/css/variables.old.css 2023-12-07 18:31:47.387543936 +0000
+++ ./tokens/css/variables.css 2023-12-07 18:31:20.951798989 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Wed Dec 06 2023 19:57:56 GMT+0000 (Coordinated Universal Time)
+ * Generated on Thu Dec 07 2023 18:31:20 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
No description provided.