Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

fix(ui): always tracked toggle for projects #1047

Merged
merged 9 commits into from Oct 16, 2020
Merged

Conversation

xla
Copy link
Contributor

@xla xla commented Oct 15, 2020

Until we introduce explicit untracking of projects, whenever we show
a project page it is inherently tracked. Therefore the track toggle
should be in tracked state and the unfollow action disabled.

Closes #1045


2020-10-16-094442_1738x1408_scrot

Until we introduce explicit untracking of projects, whenever we show
a project page it is inherently tracked. Therefore the track toggle
should be in tracked state and the unfollow action disabled.

Closes #1045
@xla xla added bug Something isn't working ui labels Oct 15, 2020
@xla xla self-assigned this Oct 15, 2020
NunoAlexandre
NunoAlexandre previously approved these changes Oct 15, 2020
@brandonhaslegs
Copy link
Contributor

Maybe should just remove the button until you can interact with it? Just having this network icon in a grey box that's not clickable will be pretty confusing.

@juliendonck
Copy link
Member

I wonder if it's not better having a tooltip explaining that you can't unfollow at the moment then to remove the functionality entirely.

@FintanH
Copy link
Contributor

FintanH commented Oct 15, 2020

What's this button even for? 😂

@xla
Copy link
Contributor Author

xla commented Oct 15, 2020

What's this button even for? joy

@FintanH To untrack a project at the point we have it that functionality supported.

@FintanH
Copy link
Contributor

FintanH commented Oct 15, 2020

To untrack a project at the point we have it that functionality supported.

Does that mean remove it from your device completely?

@xla
Copy link
Contributor Author

xla commented Oct 15, 2020

Does that mean remove it from your device completely?

TBD I guess, but I assume something along those lines. As currently "tracking" is equivalent to having a subtree in your monorepo refs.

@FintanH
Copy link
Contributor

FintanH commented Oct 15, 2020

Somebody call me when we need this 🤙

@xla
Copy link
Contributor Author

xla commented Oct 16, 2020

Following up on the discussions we had, the inactive toggle is always expanded and says "Following":

2020-10-16-094442_1738x1408_scrot

When testing it in conjunction with the peer selector there is some funkiness with z-indexing so the selector now expands to the left:

2020-10-16-094452_1738x1408_scrot

@rudolfs
Copy link
Member

rudolfs commented Oct 16, 2020

There's a weird border on hover:

Screenshot 2020-10-16 at 09 50 46

Screenshot 2020-10-16 at 09 50 50

vs non-hover

Screenshot 2020-10-16 at 09 50 58

Screenshot 2020-10-16 at 09 50 54

@rudolfs
Copy link
Member

rudolfs commented Oct 16, 2020

I can still follow/unfollow my project, the button isn't disabled. Was that behaviour also discussed, if so, what was the outcome?

but

@xla
Copy link
Contributor Author

xla commented Oct 16, 2020

I can still follow/unfollow my project, the button isn't disabled. Was that behaviour also discussed, if so, what was the outcome?

Yeah just discovered that, will fix and see if I can tame the border/box-shadow.

@rudolfs
Copy link
Member

rudolfs commented Oct 16, 2020

There's still a 1px border on hover, I think it should not be there:
border

This removes it:

diff --git a/ui/DesignSystem/Component/TrackToggle.svelte b/ui/DesignSystem/Component/TrackToggle.svelte
index 7edb809..ef4f126 100644
--- a/ui/DesignSystem/Component/TrackToggle.svelte
+++ b/ui/DesignSystem/Component/TrackToggle.svelte
@@ -42,12 +42,10 @@
   .toggle.hover {
     border: 1px solid var(--color-secondary-level-2);
     background-color: var(--color-secondary-level-2);
-    box-shadow: 0 0 0 1px var(--color-secondary-level-2);
   }
   .toggle.active {
     border: 1px solid var(--color-secondary-level-1);
     background-color: var(--color-secondary-level-1);
-    box-shadow: 0 0 0 1px var(--color-secondary-level-1);
   }
   .toggle.tracking {
     border: 1px solid var(--color-foreground-level-3);
@@ -57,18 +55,15 @@
   .toggle.tracking.hover {
     border: 1px solid var(--color-foreground-level-2);
     background-color: var(--color-foreground-level-2);
-    box-shadow: 0 0 0 1px var(--color-foreground-level-2);
     color: var(--color-foreground-level-6);
   }
   .toggle.tracking.hover.warning {
     color: var(--color-background);
     border: none;
-    box-shadow: none;
   }
   .toggle.tracking.active {
     border: 1px solid var(--color-foreground-level-2);
     background-color: var(--color-foreground-level-2);
-    box-shadow: 0 0 0 1px var(--color-foreground-level-2);
     color: var(--color-foreground-level-4);
   }
   .left {

cloudhead
cloudhead previously approved these changes Oct 16, 2020
Copy link
Member

@rudolfs rudolfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@brandonhaslegs
Copy link
Contributor

Maybe should change the cursor on the button to not-allowed and add a tooltip that says why I can't unfollow a project.

@xla xla mentioned this pull request Oct 16, 2020
@xla
Copy link
Contributor Author

xla commented Oct 16, 2020

Maybe should change the cursor on the button to not-allowed and add a tooltip that says why I can't unfollow a project.

Captured in #1061

@xla xla merged commit 1217583 into master Oct 16, 2020
@xla xla deleted the xla/1045-perma-follow branch October 16, 2020 13:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow button resets when refreshed
7 participants