Skip to content

Instantly share code, notes, and snippets.

View jodyheavener's full-sized avatar
🥰

Jody Heavener jodyheavener

🥰
View GitHub Profile
diff --git a/packages/fxa-auth-server/lib/senders/emails/storybook-email.ts b/packages/fxa-auth-server/lib/senders/emails/storybook-email.ts
index 601308432..5212f315a 100644
--- a/packages/fxa-auth-server/lib/senders/emails/storybook-email.ts
+++ b/packages/fxa-auth-server/lib/senders/emails/storybook-email.ts
@@ -17,17 +17,15 @@ export const storybookEmail = ({
}: StorybookEmailArgs): HTMLDivElement => {
const container = document.createElement('div');
container.innerHTML = 'Loading email...';
- const emailDescriptionDiv = document.createElement('div');
- if (doc) {
@jodyheavener
jodyheavener / patch.diff
Created August 5, 2021 13:39
Storybook toolbar/global extension to set text directionality
diff --git a/packages/fxa-auth-server/.storybook/main.js b/packages/fxa-auth-server/.storybook/main.js
index e4a6e8f76..b77e307ed 100644
--- a/packages/fxa-auth-server/.storybook/main.js
+++ b/packages/fxa-auth-server/.storybook/main.js
@@ -7,5 +7,9 @@ module.exports = {
'../lib/senders/emails/**/*.stories.tsx',
'../lib/senders/emails/**/*.stories.ts',
],
- addons: ['@storybook/addon-docs', '@storybook/addon-controls'],
+ addons: [
diff --git a/app/experimenter/nimbus-ui/src/components/ApolloErrorAlert/index.stories.tsx b/app/experimenter/nimbus-ui/src/components/ApolloErrorAlert/index.stories.tsx
index 36ba6ed06..e3d67b7f6 100644
--- a/app/experimenter/nimbus-ui/src/components/ApolloErrorAlert/index.stories.tsx
+++ b/app/experimenter/nimbus-ui/src/components/ApolloErrorAlert/index.stories.tsx
@@ -19,15 +19,11 @@ export const withError = () => (
);
export const withNetworkServerError = () => (
- <ApolloErrorAlert error={NETWORK_SERVER_ERROR as unknown as ApolloError} />
+ <ApolloErrorAlert error={NETWORK_SERVER_ERROR} />
export const MockExperimentContextProvider = ({
overrides = {},
refetch = () => {},
children,
}: {
overrides?: Partial<getExperiment["experimentBySlug"]>;
refetch?: () => void;
children: ReactNode;
}) => {
const { experiment } = mockExperiment("demo-slug", overrides);
diff --git a/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts b/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts
index 83093dc46..7f56440df 100644
--- a/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts
+++ b/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts
@@ -9,7 +9,12 @@ export default {
title: 'Emails/cadReminder',
} as Meta;
-const Template: Story<StorybookEmailArgs> = (args) => storybookEmail(args);
+function createEmailTemplate(name: string, args: StorybookEmailArgs) {
diff --git a/packages/fxa-auth-server/lib/senders/emails/sass-compile-files.ts b/packages/fxa-auth-server/lib/senders/emails/sass-compile-files.ts
index 3551fe3e7..d2885e173 100644
--- a/packages/fxa-auth-server/lib/senders/emails/sass-compile-files.ts
+++ b/packages/fxa-auth-server/lib/senders/emails/sass-compile-files.ts
@@ -2,17 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-import sass from 'sass';
-import { promisify } from 'util';
diff --git a/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts b/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts
index cc75c5813..90cf66c02 100644
--- a/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts
+++ b/packages/fxa-auth-server/lib/senders/emails/templates/cadReminder/index.stories.ts
@@ -7,34 +7,35 @@ export default {
const Template: Story<StorybookEmailArgs> = (args) => storybookEmail(args);
+const defaultVariables = {
+ buttonText: 'Sync device',
@jodyheavener
jodyheavener / index.stories.tsx
Created July 7, 2021 17:00
Example using Storybook HTML, no react
import { Story, Meta } from '@storybook/html';
import storybookEmail, { StorybookEmailArgs } from '../storybook-email';
export default {
title: 'Emails',
} as Meta;
const Template: Story<StorybookEmailArgs> = (args) => storybookEmail(args);
export const CadReminder = Template.bind({});
diff --git a/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx b/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx
index a9dd3dc11..c4891e6d0 100644
--- a/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx
+++ b/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx
@@ -344,16 +344,16 @@ describe("FormBranches", () => {
}
const oldValue = featureConfigSelects[0].value;
- act(() => {
- fireEvent.change(featureConfigSelects[0], {
diff --git a/app/experimenter/experiments/api/v5/types.py b/app/experimenter/experiments/api/v5/types.py
index be949b79..5a14a7bf 100644
--- a/app/experimenter/experiments/api/v5/types.py
+++ b/app/experimenter/experiments/api/v5/types.py
@@ -143,6 +143,7 @@ class NimbusExperimentType(DjangoObjectType):
is_enrollment_paused = graphene.Boolean()
enrollment_end_date = graphene.DateTime()
can_review = graphene.Boolean()
+ is_editable = graphene.Boolean()
rejection = graphene.Field(NimbusChangeLogType)