Skip to content
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

feat: Add Activate button gated behind detours-list test group #2713

Merged
merged 9 commits into from
Aug 1, 2024

Conversation

joshlarson
Copy link
Contributor

@joshlarson joshlarson commented Jul 30, 2024

Copy link

Coverage of commit a09633c

Summary coverage rate:
  lines......: 93.1% (3319 of 3566 lines)
  functions..: 72.6% (1357 of 1870 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@joshlarson joshlarson changed the title feat: Activate button feat: Add Activate button gated behind detours-list test group Jul 30, 2024
@joshlarson joshlarson marked this pull request as ready for review July 30, 2024 18:58
@joshlarson joshlarson requested a review from a team as a code owner July 30, 2024 18:58
Comment on lines 112 to 115

.c-diversion-panel__activate-button {
background-color: semantic.$missed-stop;
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need bespoke css for this? I'd prefer to use a variant on the button itself https://react-bootstrap.github.io/docs/components/buttons

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh - I didn't realize I could do that

(It gives it nicer hover behavior too!)

@@ -0,0 +1,86 @@
import React from "react"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a thing I've been thinking about doing for a while.

diversionPage.test.tsx is getting very large, which makes it kind of unwieldy. There's no reason we need to have all of the detour tests live in the same file. I was thinking that we could start splitting out test cases for different angles of the detours feature into different test files.

For instance, all of the test cases that make assertions about which route-shape pieces are visible could be in diversionPageRouteShapes.test.tsx, and the test cases that assert when the undo and clear buttons are disabled or enabled might live in diversionPageUndoClearButtons.test.tsx.

Exactly how to divvy the use cases into files is a matter of taste, and I don't have strong feelings about it. But I figured that test cases related to saving/activating might be happiest away from everything else.

@joshlarson joshlarson requested a review from firestack July 30, 2024 20:47
Copy link

Coverage of commit a9c43b6

Summary coverage rate:
  lines......: 93.1% (3319 of 3566 lines)
  functions..: 72.6% (1357 of 1870 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

Copy link

Coverage of commit 135faf1

Summary coverage rate:
  lines......: 93.1% (3319 of 3566 lines)
  functions..: 72.6% (1357 of 1870 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@@ -233,6 +233,11 @@ export const DiversionPage = ({
onNavigateBack={editDetour}
detourText={textArea}
onChangeDetourText={setTextArea}
onActivateDetour={
inTestGroup(TestGroups.DetoursList)
? () => alert("Activate!")
Copy link
Member

Choose a reason for hiding this comment

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

nit: I can't quite articulate why, so I guess take this as non-blocking, but I'd prefer to not use alert if we don't really need it.

Copy link
Collaborator

@hannahpurcell hannahpurcell Aug 1, 2024

Choose a reason for hiding this comment

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

Does knowing that this is only a temporary thing change your feeling? The alert is only in lieu of having hi-fi designs for this action

Copy link
Member

Choose a reason for hiding this comment

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

Slightly, I'm fine with it being non-blocking, but I'm inclined to enable the https://eslint.org/docs/latest/rules/no-alert rule

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh I'm happy to remove it - I used alert because it was an easy way to locally test it, but I'm not attached.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

github-actions bot commented Aug 1, 2024

Coverage of commit cec1abd

Summary coverage rate:
  lines......: 93.1% (3319 of 3566 lines)
  functions..: 72.6% (1357 of 1870 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@joshlarson joshlarson merged commit 75efa24 into main Aug 1, 2024
33 checks passed
@joshlarson joshlarson deleted the jdl/feat/activate-detour branch August 1, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants