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

useContext hook not working with shallow #2176

Open
2 of 13 tasks
mstorus opened this issue Jun 27, 2019 · 36 comments
Open
2 of 13 tasks

useContext hook not working with shallow #2176

mstorus opened this issue Jun 27, 2019 · 36 comments

Comments

@mstorus
Copy link

mstorus commented Jun 27, 2019

The useContext hook does not work with shallow rendering and passing in context. Are there any workarounds for now?

Current behavior

The value returned by useContext in a function component appears to be empty when using shallow and passing in a context argument. (The same problem also occurs when wrapping the component in the appropriate context Provider directly and then calling .dive()).

Here is a minimal test case, also reproduced at https://codesandbox.io/s/nice-blackwell-yz7tn in the index.spec.js file.

import React, { useContext } from "react";
import PropTypes from "prop-types";

import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

Enzyme.configure({ adapter: new Adapter() });

const MyContext = React.createContext({});

export const MyComponent = () => {
  const { myVal } = useContext(MyContext);

  return <div data-test="my-component">{myVal}</div>;
};

it("renders the correct text", () => {
  MyComponent.contextTypes = {
    myVal: PropTypes.any
  };
  const wrapper = shallow(
    <MyComponent />,
    {context: {myVal: 'foobar'}}
  );
  expect(wrapper.text()).toEqual("foobar"); // expected "foobar" received ""
});

Expected behavior

The text in the example above is expected to be "foobar", but it's actually "".
In general, the value returned from useContext appears to be undefined.

Note that using mount instead of shallow causes the test to pass.

Also note: the codesandbox above has a second file (class.spec.js) in which a hack is employed that makes the test pass, which uses the legacy contextTypes. But this only appears to work with classes and this.context, not with useContext.

Your environment

enzyme 3.10.0
enzyme-adapter-react-16 1.14.0
react 16.8.6
react-dom 16.8.6

API

  • shallow
  • mount
  • render

Version

library version
enzyme
react
react-dom
react-test-renderer
adapter (below)

Adapter

  • enzyme-adapter-react-16
  • enzyme-adapter-react-16.3
  • enzyme-adapter-react-16.2
  • enzyme-adapter-react-16.1
  • enzyme-adapter-react-15
  • enzyme-adapter-react-15.4
  • enzyme-adapter-react-14
  • enzyme-adapter-react-13
  • enzyme-adapter-react-helper
  • others ( )
@ljharb
Copy link
Member

ljharb commented Jun 27, 2019

enzyme's context options only work with "legacy" context; I believe useContext uses a different mechanism. React, and react's shallow renderer, don't seem to provide any way for us to hook into hooks.

@DerekLouie
Copy link

I also am having this problem, and would MEGA appreciate any workarounds or fixes that might come :)

@mstorus
Copy link
Author

mstorus commented Jun 27, 2019

for the sake of explicitness, here's an example of directly using a context provider and calling .dive(), which also doesn't work:

https://codesandbox.io/s/elastic-zhukovsky-w5pjc
index.spec.js

import React, { useContext } from "react";

import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

Enzyme.configure({ adapter: new Adapter() });

const MyContext = React.createContext({});

export const MyComponent = () => {
  const { myVal } = useContext(MyContext);

  return <div data-test="my-component">{myVal}</div>;
};

it("renders the correct text", () => {
  const wrapper = shallow(
    <MyContext.Provider value={{ myVal: "foobar" }}>
      <MyComponent />
    </MyContext.Provider>
  ).dive();
  expect(wrapper.text()).toEqual("foobar"); // expected "foobar" received ""
});

@ljharb is the reason why this variation also doesn't work the same as you mentioned above?

@ljharb
Copy link
Member

ljharb commented Jun 27, 2019

It'd be because .dive() needs to access the context in order to forward it along. However, if you try this, it might work:

it("renders the correct text", () => {
  const wrapper = shallow(
    <MyComponent />,
    {
      wrappingComponent: MyContext.Provider,
      wrappingComponentProps: { value: { myVal: 'foobar' }
    }
  );
  expect(wrapper.text()).toEqual("foobar"); // expected "foobar" received ""
});

@mstorus
Copy link
Author

mstorus commented Jun 28, 2019

Unfortunately this also results in the context value being undefined.

https://codesandbox.io/s/amazing-noether-bv6u7

import React, { useContext } from "react";

import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

Enzyme.configure({ adapter: new Adapter() });

const MyContext = React.createContext({});

export const MyComponent = () => {
  const { myVal } = useContext(MyContext);

  return <div data-test="my-component">{myVal}</div>;
};

it("renders the correct text", () => {
  const wrapper = shallow(<MyComponent />, {
    wrappingComponent: MyContext.Provider,
    wrappingComponentProps: { value: { myVal: "foobar" } }
  });

  console.log(wrapper.debug()); // <div data-test="my-component" /> 
  console.log(wrapper.text()); // ""
});

@Tan90Qian
Copy link

Tan90Qian commented Jun 28, 2019

shallow()just use wrappingComponentoption in makeShallowOptions() but not in adapter.createRenderer.So it just use wrappingComponent to create context param of option but never use wrappingComponent to wrap the node.

The evidence is that if you use snapshot test, you will not find wrappingComponent in the result.

@Tan90Qian
Copy link

ReactSixteenAdapter.createShallowRenderer() use react-test-renderer/shallow to create real component.

createShallowRenderer(options = {}) {
  const adapter = this;
  const renderer = new ShallowRenderer();
  ...
  return {
    render(el, unmaskedContext, {
      providerValues = new Map(),
    } = {}) {
      if (typeof el.type === 'string') {
        isDOM = true;
      } else if (isContextProvider(el)) {
        providerValues.set(el.type, el.props.value);
        const MockProvider = Object.assign(
          props => props.children,
          el.type,
        );
        return withSetStateAllowed(() => renderer.render({ ...el, type: MockProvider }));
      }
      ...
    },
    ...
  }
}

Maybe createShallowRenderer() could use wrappingComponent to wrap the result of withSetStateAllowed()?

@mstorus
Copy link
Author

mstorus commented Jul 1, 2019

The workaround I'm using for now is the one described in this article; wrap useContext in a function and then use jest to mock the implementation.

https://codesandbox.io/s/crimson-mountain-vo7sk

MyContext.js

import React, { useContext } from "react";

const MyContext = React.createContext({});
export default MyContext;
export const useMyContext = () => useContext(MyContext);

index.spec.js

import React from "react";

import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

import MyContext, { useMyContext } from "./MyContext";
import * as MyContextModule from "./MyContext";

Enzyme.configure({ adapter: new Adapter() });

export const MyComponent = () => {
  const { myVal } = useMyContext(); // instead of useContext(MyContext)

  return <div data-test="my-component">{myVal}</div>;
};

it("renders the correct text", () => {
  jest.spyOn(MyContextModule, "useMyContext").mockImplementation(() => ({
    myVal: "foobar"
  }));

  const wrapper = shallow(
    <MyContext.Provider>
      <MyComponent />
    </MyContext.Provider>
  ).dive();
  expect(wrapper.text()).toEqual("foobar");
});

@garyyeap
Copy link

garyyeap commented Jul 2, 2019

I'm having same issue with using react-redux 7.1, but I can't change the way how react-redux use the useContext(). Is there any other workaround?

The workaround I'm using for now is the one described in this article; wrap useContext in a function and then use jest to mock the implementation.

https://codesandbox.io/s/crimson-mountain-vo7sk

MyContext.js

import React, { useContext } from "react";

const MyContext = React.createContext({});
export default MyContext;
export const useMyContext = () => useContext(MyContext);

index.spec.js

import React from "react";

import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

import MyContext, { useMyContext } from "./MyContext";
import * as MyContextModule from "./MyContext";

Enzyme.configure({ adapter: new Adapter() });

export const MyComponent = () => {
  const { myVal } = useMyContext(); // instead of useContext(MyContext)

  return <div data-test="my-component">{myVal}</div>;
};

it("renders the correct text", () => {
  jest.spyOn(MyContextModule, "useMyContext").mockImplementation(() => ({
    myVal: "foobar"
  }));

  const wrapper = shallow(
    <MyContext.Provider>
      <MyComponent />
    </MyContext.Provider>
  ).dive();
  expect(wrapper.text()).toEqual("foobar");
});

@BlobRage0
Copy link

I'm having same issue with using react-redux 7.1, but I can't change the way how react-redux use the useContext(). Is there any other workaround?

The workaround I'm using for now is the one described in this article; wrap useContext in a function and then use jest to mock the implementation.
https://codesandbox.io/s/crimson-mountain-vo7sk
MyContext.js

import React, { useContext } from "react";

const MyContext = React.createContext({});
export default MyContext;
export const useMyContext = () => useContext(MyContext);

index.spec.js

import React from "react";

import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

import MyContext, { useMyContext } from "./MyContext";
import * as MyContextModule from "./MyContext";

Enzyme.configure({ adapter: new Adapter() });

export const MyComponent = () => {
  const { myVal } = useMyContext(); // instead of useContext(MyContext)

  return <div data-test="my-component">{myVal}</div>;
};

it("renders the correct text", () => {
  jest.spyOn(MyContextModule, "useMyContext").mockImplementation(() => ({
    myVal: "foobar"
  }));

  const wrapper = shallow(
    <MyContext.Provider>
      <MyComponent />
    </MyContext.Provider>
  ).dive();
  expect(wrapper.text()).toEqual("foobar");
});

I have the same problem. Did you solve it?

@Alphy11
Copy link

Alphy11 commented Jul 11, 2019

This is broken until facebook/react#15589 gets though. As hooks do not really work in shallow without it.

@bdwain
Copy link
Contributor

bdwain commented Jul 11, 2019

that react PR is only for getting useEffect to work. It doesn't address context, though something similar may be doable.

jsnajdr added a commit to Automattic/wp-calypso that referenced this issue Aug 12, 2019
…omponent, use full mount

React Redux 7.x no longer supports `store` prop for `Provider`, and uses the new `React.createContext()`
instead of the legacy context. That requires an update of the unit tests.

- use `wrappingComponent` option to activate a mock Redux provider
- switch to full mount, as `wrappingComponent` doesn't work with `useContext` in Enzyme (enzymejs/enzyme#2176)
jsnajdr added a commit to Automattic/wp-calypso that referenced this issue Aug 15, 2019
…omponent, use full mount

React Redux 7.x no longer supports `store` prop for `Provider`, and uses the new `React.createContext()`
instead of the legacy context. That requires an update of the unit tests.

- use `wrappingComponent` option to activate a mock Redux provider
- switch to full mount, as `wrappingComponent` doesn't work with `useContext` in Enzyme (enzymejs/enzyme#2176)
@kotarella1110
Copy link

I'm having same issue with using react-redux 7.1, but I can't change the way how react-redux use the useContext(). Is there any other workaround?

The workaround I'm using for now is the one described in this article; wrap useContext in a function and then use jest to mock the implementation.
https://codesandbox.io/s/crimson-mountain-vo7sk
MyContext.js

import React, { useContext } from "react";

const MyContext = React.createContext({});
export default MyContext;
export const useMyContext = () => useContext(MyContext);

index.spec.js

import React from "react";

import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";

import MyContext, { useMyContext } from "./MyContext";
import * as MyContextModule from "./MyContext";

Enzyme.configure({ adapter: new Adapter() });

export const MyComponent = () => {
  const { myVal } = useMyContext(); // instead of useContext(MyContext)

  return <div data-test="my-component">{myVal}</div>;
};

it("renders the correct text", () => {
  jest.spyOn(MyContextModule, "useMyContext").mockImplementation(() => ({
    myVal: "foobar"
  }));

  const wrapper = shallow(
    <MyContext.Provider>
      <MyComponent />
    </MyContext.Provider>
  ).dive();
  expect(wrapper.text()).toEqual("foobar");
});

I have the same problem with using styled-components@next (v5) :'(

@lensbart
Copy link

Same problem (I think?) here with react-intl’s useIntl

@ljharb
Copy link
Member

ljharb commented Aug 23, 2019

@lensbart all custom hooks are built on top of builtin hooks; useIntl presumably uses useContext.

@longlho
Copy link

longlho commented Sep 14, 2019

Yes it does

@Alphy11
Copy link

Alphy11 commented Sep 14, 2019

@ljharb Is there something more complex preventing this? Or is it just nobody has stepped up to do the work?

Would something similar to facebook/react#16168 fix this? If you could point me in the right direction, I'm happy to make the change. I am not well acquainted with React shallow renderer internals though, so any advice would be appreciated.

@KenLui
Copy link

KenLui commented Sep 17, 2019

I found some workarounds for shallow rendering with React.useContext, Material UI's makeStyles, and react-redux v7.x.x. See below for some high level notes and my codesandbox for examples.

Components that consume context using React.useContext()

  • use just.spyOn(React, 'useContext').mockImplementation((context) => 'context_value' ) to return a context value. (Thanks to @mstorus's example above for the idea of mocking module implementations). @garyyeap, you can do this to mock useContext for code you don't control, but that won't help you with react-redux 7.1. See the Redux section below for the redux workaround.
  • Wrapping your component in <Context.Provider value={myContextValue}/> does not work.
  • Using the wrappingComponent option does not work.

Components that consume context using <Context.Consumer />

  • Wrapping your component in <Context.Provider value={myContextValue}/> works.
  • Using the wrappingComponent option works.

Material UI's makeStyles

  • Uses the React.useContext() hook. You'll have to mock return values for React.useContext() for both ThemeContext and StylesContext to get this to work. Yeah, this is pretty gross, but it's all I got.

Redux - Redux has some fancy logic for using context. It looks like you can optionally pass the store or a custom context into a connected component.

  • Inject store into connected component. E.G. <MyConnectedComponent store={mockStore}/>
  • Inject custom context into connected component. E.G. <MyConnectedComponent context={MockReduxContext}/>

It's pretty disappointing that shallow rendering's been broken for so long and that our options are limited to switching to mount or finding brittle workarounds like these.

@ljharb
Copy link
Member

ljharb commented Sep 18, 2019

@Alphy11 yes - the change either needs to be made directly in react's shallow renderer, or, enzyme would need to rebuild from scratch react's entire hooks system. Certainly someone submitting a PR to either react or enzyme would be great, but it's not simple, fast, or straightforward.

@twharmon
Copy link

For me, just.spyOn(React, 'useContext').mockImplementation(() => {...} ) will work if my component has const ctx = React.useContext(MyContext) but not with const ctx = useContext(MyContext).

@KenLui
Copy link

KenLui commented Sep 20, 2019

@twharmon, try this for named exports.

E.G.

import * as ReactAll from 'react';

// React is ReactAll.default
// useContext is ReactAll.useContext
jest.spyOn(ReactAll, 'useContext').mockImplementation(() => {...}

jsnajdr added a commit to Automattic/wp-calypso that referenced this issue Nov 8, 2019
…omponent, use full mount

React Redux 7.x no longer supports `store` prop for `Provider`, and uses the new `React.createContext()`
instead of the legacy context. That requires an update of the unit tests.

- use `wrappingComponent` option to activate a mock Redux provider
- switch to full mount, as `wrappingComponent` doesn't work with `useContext` in Enzyme (enzymejs/enzyme#2176)
jsnajdr added a commit to Automattic/wp-calypso that referenced this issue Nov 12, 2019
* fix(deps): update dependency redux-form to v8

* fix(deps): update dependency react-redux to v7

* ImageEditorCanvas: change react-redux withRef to forwardRef, modernize the component

React Redux ref API has changed in 7.0.0.

Modernization includes:
- use modern refs
- use arrow functions for bound methods
- every variable has its own `const` decl

* Zoninator Search Autocomplete: change react-redux withRef to forwardRef

* Notifications: use react-redux forwardRef to get list element

* Get Redux store from new React context in TinyMCE wrappers

* WebPaymentBox unit test: pass mock Redux store by wrappingComponent enzyme option

Instead of using the legacy React context, which is an implementation detail of particular
React Redux version, use the Enzyme's `wrappingComponent` option to render a mock Redux
provider above the tested component.

* WithContactDetailsValidation Unit Test: pass Redux store as wrappingComponent, use full mount

React Redux 7.x no longer supports `store` prop for `Provider`, and uses the new `React.createContext()`
instead of the legacy context. That requires an update of the unit tests.

- use `wrappingComponent` option to activate a mock Redux provider
- switch to full mount, as `wrappingComponent` doesn't work with `useContext` in Enzyme (enzymejs/enzyme#2176)

* Jetpack Connect Help Button: convert to hooked functional component with useDispatch

* PluginsList: rewrite tests to use Enzyme

* DomainManagement.List: rewrite tests to use Enzyme
@clottman
Copy link

clottman commented Mar 9, 2020

I spent a long time trying a bunch of things because the docs for shallow made it sound like wrappingComponent would work. CodeSandbox of my attempts

The docs for shallow say:

options.wrappingComponent: (ComponentType [optional]): A component that will render as a parent of the node. It can be used to provide context to the node, among other things. See the getWrappingComponent() docs for an example. Note: wrappingComponent must render its children.

In an app context, rendering a Context.Provider as the parent of a node would make the provided values available to any useContext hooks in the child node. But this isn't the case with shallow. The linked getWrappingComponent docs show that this works if the provider is a react-redux Provider - what's different about that vs. a React Context Provider?

Is there a better way the docs could describe what providing wrappingComponent will actually do, so others don't run into this same thing?

@ljharb
Copy link
Member

ljharb commented Mar 10, 2020

useContext isn't the same as actual React context; the wrappingComponent approach works for this.context, or an FC's context arg, not for useContext.

@clottman
Copy link

@ljharb yes, you know that from looking at React internals, and I know that because you've said it in this issue. But the React docs for useContext don't imply that at all; in fact, they imply the opposite:

If you’re familiar with the context API before Hooks, useContext(MyContext) is equivalent to static contextType = MyContext in a class, or to <MyContext.Consumer>.

But since it is different in a way that matters to Enzyme, what can we add to the documentation to make other people know it, too? If this issue was archived tomorrow and the discussion disappeared, what guardrails would be in place to stop someone else from opening a new issue to report the apparent bug? (And thereby wasting the maintainer's time, as well as their own.)

@clottman
Copy link

A coworker pointed out the code example in the docs on getWrappingComponent also doesn't work now, since it uses react-redux, which now also uses useContext under the hood.

I added a test to my code sandbox to demonstrate this.

@ljharb
Copy link
Member

ljharb commented Mar 12, 2020

I'd be happy to review a PR that clarifies the docs (including the unfortunately-now-incorrect react-redux example).

@clottman
Copy link

I could update the docs to remove the incorrect example and add caveats about useContext, but I fear that would be rather incomplete - I haven't figured out what the use case is for wrappingComponent that would make people need it.

@ljharb
Copy link
Member

ljharb commented Mar 12, 2020

It allows you to wrap a component in a (legacy) context provider, but directly be wrapping the actual component, so you don't have to dive down to the thing you're actually trying to test.

@splybon
Copy link

splybon commented Mar 20, 2020

For me, just.spyOn(React, 'useContext').mockImplementation(() => {...} ) will work if my component has const ctx = React.useContext(MyContext) but not with const ctx = useContext(MyContext).

@twharmon
I don't have to do that if I do

jest.mock("react", () => ({
  ...jest.requireActual("react"),
  useContext: () => 'context_value'
}));

instead of

jest.spyOn(React, 'useContext').mockImplementation(() => 'context_value')

@comatory
Copy link

@splybon Weird, this one does not work for me but the version with jest.mock('react', ... does. I have made sure my custom hook with context is written like this:

import React from 'react'

import MyContext from '../real-app-context'

...

const myCustomHook = () => {
  const context = React.useContext(MyContext)
  const { dependency } = MyContext
  ....

And in tests I do

const testContext = {
  dependency: mockDependency
}

jest.spyOn(React, 'useContext').mockImplementation(() => testContext)

For some reason it's still using the context from ./real-app-context path.

@castamir
Copy link

castamir commented Jan 1, 2021

I was able to workaround it the following way:

const MyProvider: React.FC<{
  children: React.ReactElement;
}> = ({ children }) => {
  const originalUseContext = React.useContext;
  const useContextSpy = jest.spyOn(React, 'useContext');
  useContextSpy.mockImplementation(contextType =>
    contextType === MyContext ? 'context_value' : originalUseContext(contextType)
  );

  React.useEffect(() => {
    return () => {
      useContextSpy.mockRestore();
    };
  }, [useContextSpy]);

  return children;
};

and its usage:

const wrapper = shallow(<MyComponent />, {
  wrappingComponent: MyProvider,
  wrappingComponentProps: {},
});

You can pass context value via wrappingComponentProps if you want

@danielo515
Copy link

@twharmon, try this for named exports.

E.G.

import * as ReactAll from 'react';

// React is ReactAll.default
// useContext is ReactAll.useContext
jest.spyOn(ReactAll, 'useContext').mockImplementation(() => {...}

Does this work? Because I love it. I mean, for me it is a better workaround than having to modify the code you are testing to use React.useXXX instead, I hate that.

@ljharb
Copy link
Member

ljharb commented Apr 8, 2021

That indeed only works if your real code always live-looks-up React.useWhatever.

@danielo515
Copy link

That indeed only works if your real code always live-looks-up React.useWhatever.

I think it is exactly the opposite. He seems to be proposing a solution to that problem

@ljharb
Copy link
Member

ljharb commented Apr 9, 2021

That solution requires relying on very specific babel interop implementation details.

@danielo515
Copy link

That solution requires relying on very specific babel interop implementation details.

Ok, that is something I didn't knew

simenko added a commit to simenko/precise-ui that referenced this issue Sep 2, 2021
The tests with context were failing with the error: "Invariant
Violation: Hooks can only be called inside the body of a function
component".

The root cause is somwhere between styled-components v5+ which started
using React hooks and enzyme renderer. The cleanest workaround I have
found is enzymejs/enzyme#2176 (comment)
johndavey72 added a commit to nice-digital/global-nav that referenced this issue Nov 19, 2021
wa-rren-dev added a commit to nice-digital/global-nav that referenced this issue Nov 22, 2021
* context experiments

* basic context setup

* tidy up debugging

* uncommen event listener for expected closing behaviour

* make debug clearer

* clean up console logging for clarity

* move globalnavcontext provider up to header component

* GN-117 add useCallback to clickOutside hook to maintain reference to id of open dropdown

* GN-117 Refactor Nav component to class. Add custom hook and context for open dropdown state and nav area click outside detection

* GN-117 Begin conversion of Account class component to functional component

* GN-117 Remove commented out lines

* GN-117 Reinstate propTypes for Naccount placeholder component

* Side effect sideline (#150)

* side effect shenanigans

* Magical useRef()

* update key event to use e.key rather than e.keycode for better cross platform

* Move myAccount isExpanded state into GlobalNavContext

* Remove redundant event binding

* Make megamenu click detection more 'reacty'

* Manage context of opened menus

* Rename Naccount component to Account

Co-authored-by: John Davey <john.davey@nice.org.uk>

* Tests needed

* GN-117 Tidy up redundant arguments and commented out logic for useClickOutside hook

* GN-117 Change directory structure for hooks and react context. Make useClickOutside re-useable.

* GN-117 Import GlobalNavContextProvider from new location for Account tests

* GN-117 Fixing broken unit tests

* GN-117 Fixing broken tests

* GN-117 Fixing broken tests

* Replace simulate click

* GN-117 Revert some tests to shallow rendering after adding defaults to context

* GN-117 Revert to shallow mounting for a previously failing unit test

* GN-117 Convert unit test from shallow to mount due to issues around enzyme support of useContext 'enzymejs/enzyme#2176'

* GN-117 Rename GlobalNavContext to HeaderContext

* GN-117 remove unused dependencies from account test

* GN-117 Tidy up unit tests

* testing custom hook useClickOutside

* basic setup

* Custom hook test

* Update test

* Rename test

Co-authored-by: w@rren <w@rren.dev>
kavithanice pushed a commit to nice-digital/global-nav that referenced this issue Dec 2, 2021
* GN-95 Move NavLinks to own component

* GN-95 Get button in if dropdown

* GN-95 Skip links and click behaviour

* GN-95 Skip links

* GN-95 Styling

* GN-95 Styling, aria controls, chevron

* GN-95 Active text on button

* GN-95 Refactoring styling

* Ignore netlify file

* GN-95 Chevrons and revised services list

* GN-95 Link styling

* GN-95 More services dropdown and styling

* GN-95 Missed commit with dropdownComponent

* Comment out test to get build

* Attempt fix for $RefreshReg$ issue

See https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#usage-with-indirection-like-workers-and-js-templates

* Focus trap plugin

* GN-95 Focus trap around all of nav when active

* Remove tests for alpha

* GN-95 Focus trap no initial focus

* GN-95 Z-index for pathways and guidance fix

* GN-95 Escape by clicking search or acccount

* GN-95 Replacing with nds components

* GN-95 Config fix for grid css issue

* GN-101 Issues (#122)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Bnf content (#125)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Nitpicking css

* GN-102 Pull url from services

* GN-102 Spacing

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-102 Fix letters and dancing button

Co-authored-by: w@rren <w@rren.dev>

* GN-103 Bnfc content (#126)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-103 Revert nav text to abbreviation

* GN-103 Use var for url

* GN-103 Spacing

* GN-101 Fix failing tests

* GN-103 Update snapshot

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

Co-authored-by: w@rren <w@rren.dev>

* GN-105 Standards and indicators content (#128)

* GN-105 Content for standards and indicators

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-105 Update snapshot

* GN-105 Amend S&I base link

Co-authored-by: w@rren <w@rren.dev>
Co-authored-by: John Davey <66066685+johndavey72@users.noreply.github.com>

* GN-106 About us content (#130)

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-98 Content update

* GN-106 About us content

* GN-101 Fix failing tests

* GN-106 Update snapshot

* GN-98 Snapshot updated

* GN-106 Content link issue

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Prettier

* Reset root about us URL

Co-authored-by: w@rren <w@rren.dev>
Co-authored-by: John Davey <john.davey@nice.org.uk>
Co-authored-by: John Davey <66066685+johndavey72@users.noreply.github.com>

* GN-98 Guidance content (#129)

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-98 Content update

* GN-101 Fix failing tests

* GN-98 Snapshot updated

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Url updates

* Prettier

Co-authored-by: w@rren <w@rren.dev>
Co-authored-by: John Davey <john.davey@nice.org.uk>

* GN-104 Cks content (#127)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-104 Snapshot update

* Snapshot update

Co-authored-by: w@rren <w@rren.dev>
Co-authored-by: John Davey <john.davey@nice.org.uk>

* GN-109 More dropdown content (#133)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* Snapshot update

Co-authored-by: Eleanor Mollett <eleanor.mollett@gmail.com>
Co-authored-by: John Davey <john.davey@nice.org.uk>

* GN-110 Life sciences content (#137)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-110 Life Sciences dropdown content

* Snapshot update

Co-authored-by: Eleanor Mollett <eleanor.mollett@gmail.com>
Co-authored-by: John Davey <john.davey@nice.org.uk>

* GN-107 Pathways content (#134)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* Snapshot update

Co-authored-by: Eleanor Mollett <eleanor.mollett@gmail.com>
Co-authored-by: John Davey <john.davey@nice.org.uk>

* GN-000 All content (#132)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-110 Life Sciences dropdown content

* Snapshot update

Co-authored-by: w@rren <w@rren.dev>
Co-authored-by: John Davey <john.davey@nice.org.uk>

* GN-108 Snag list (#138)

* Scrim

* GN-101 Move focus to search when clicked

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Close MyAccount Dropdown on meganav click

* GN-101 Styling issues across applications

* GN-101 Use bundled design system css

* GN-101 Loose grid

* GN-98 Initial guidance content

* GN-95 Now click scrim to close

* GN-101 Fix list styling variation

* GN-102 Add BNF content

* GN-102 BNFc content

* GN-102 BNF content update

* GN-103 BNFC content

* GN-104 CKS content

* GN-104 Revert nav text to abbreviation

* GN-103 Revert nav text to abbreviation

* GN-101 Code review fixes

Co-authored-by: w@rren <w@rren.dev>

* GN-102 Nitpicking css

* GN-104 Rename var

* GN-102 Pull url from services

* GN-103 Use var for url

* GN-98 Content update

* demo stuff

* GN-104 Url var

* GN-102 Spacing

* GN-103 Spacing

* GN-105 Content for standards and indicators

* GN-106 About us content

* GN-105 Update links

* GN-105 Remove standards and indicators from more

* GN-101 Fix failing tests

* GN-102 Update snapshot

* GN-103 Update snapshot

* GN-105 Update snapshot

* GN-106 Update snapshot

* GN-104 Update snapshot

* GN-98 Snapshot updated

* GN-000 Alpha services. May want renaming for UR.

* GN-000 Renamed for UR. DO NOT DEPLOY TO LIVE.

* GN-000 Snapshot updated

* GN-000 Links for UR. DO NOT DEPLOY TO LIVE

* GN-000 Prettier issue

* GN-102 Fix letters and dancing button

* GN-103 Button fix and letter link fix

* GN-103 Button dancing fix

* GN-103 Another dancing button fix attempt

* GN-106 Content link issue

* GN-105 Amend S&I base link

* Start guidance content

* AW/21 Colour Scheme

* GN-98 Guidance content

* GN-106 About us content update

* GN-109 More content

* GN-107 Pathways content

* GN-108 Remove e.preventDefault on mega menu click handler to enable links to work

* GN-108 Fix scrim

* GN-108 Add canUseDOM state to control display of dropdown menus in main nav

* Duplicate css removed

* Remove duplicate CSS

* Remove duplicate css

* Remove duplicate export

* Links to live

* Tidy up

* GN-108 Primary to CTA buttons

* GN-108 Add column gap

* GN-108 Consistent URLs

Co-authored-by: Eleanor Mollett <eleanor.mollett@gmail.com>
Co-authored-by: John Davey <john.davey@nice.org.uk>

* GN-112 New simplified pathways content (#139)

* GN-112 New simplified pathways content

* GN-112 Remove pathways dropdown

* GN-113 Alpha snag list (#140)

* Settings

* GN-113 Alpha snag list

* Config typo

* GN-000 Merge npm release (#144)

* GN-116 Publishing to npm (#142)

* GN-116 Pin Node version with Volta

* GN-116 Update readme

* GN-56 Footer logo and remove IE8 support for SVG fallback (#141)

Co-authored-by: Ian Routledge <ian@ediblecode.com>

Co-authored-by: Ian Routledge <ian.routledge@nice.org.uk>
Co-authored-by: Ian Routledge <ian@ediblecode.com>

* GN-119 BNF CSS scoping (#146)

* GN-138 Shorten nav copy (#147)

* GN-140 Standards and indicators content (#151)

* GN-116 Publishing to npm (#142)

* GN-116 Pin Node version with Volta

* GN-116 Update readme

* GN-56 Footer logo and remove IE8 support for SVG fallback (#141)

Co-authored-by: Ian Routledge <ian@ediblecode.com>

* GN-140 Standards removal

Co-authored-by: Ian Routledge <ian.routledge@nice.org.uk>
Co-authored-by: Ian Routledge <ian@ediblecode.com>

* GN-118 Add non-JS dropdown (#149)

* GN-118 Add non-JS dropdown

* GN-118 More link fallback

* Removed redundant nesting

* GN-117 Remove need to assert on dom (#148)

* context experiments

* basic context setup

* tidy up debugging

* uncommen event listener for expected closing behaviour

* make debug clearer

* clean up console logging for clarity

* move globalnavcontext provider up to header component

* GN-117 add useCallback to clickOutside hook to maintain reference to id of open dropdown

* GN-117 Refactor Nav component to class. Add custom hook and context for open dropdown state and nav area click outside detection

* GN-117 Begin conversion of Account class component to functional component

* GN-117 Remove commented out lines

* GN-117 Reinstate propTypes for Naccount placeholder component

* Side effect sideline (#150)

* side effect shenanigans

* Magical useRef()

* update key event to use e.key rather than e.keycode for better cross platform

* Move myAccount isExpanded state into GlobalNavContext

* Remove redundant event binding

* Make megamenu click detection more 'reacty'

* Manage context of opened menus

* Rename Naccount component to Account

Co-authored-by: John Davey <john.davey@nice.org.uk>

* Tests needed

* GN-117 Tidy up redundant arguments and commented out logic for useClickOutside hook

* GN-117 Change directory structure for hooks and react context. Make useClickOutside re-useable.

* GN-117 Import GlobalNavContextProvider from new location for Account tests

* GN-117 Fixing broken unit tests

* GN-117 Fixing broken tests

* GN-117 Fixing broken tests

* Replace simulate click

* GN-117 Revert some tests to shallow rendering after adding defaults to context

* GN-117 Revert to shallow mounting for a previously failing unit test

* GN-117 Convert unit test from shallow to mount due to issues around enzyme support of useContext 'enzymejs/enzyme#2176'

* GN-117 Rename GlobalNavContext to HeaderContext

* GN-117 remove unused dependencies from account test

* GN-117 Tidy up unit tests

* testing custom hook useClickOutside

* basic setup

* Custom hook test

* Update test

* Rename test

Co-authored-by: w@rren <w@rren.dev>

* Set base high z-index (#152)

* Snapshot update

* Remove nerv

* GN-146 Data tracking attributes

* GN-146 Data tracking attributes (#153)

* Update snapshot

* GN-115 Add additional data-tracking attributes

* GN-115 Update test snapshot

* GN-145 Implement self contained grid system (#155)

* Replace find with filter (#154)

* GN-148 Fix content overflow

* Move focus trap to deps

* GN-149 Skip x route (#157)

* GN-149 Reinstate ids for top level links to make them focussable upon closing dropdown

* GN-149 Refactor

Co-authored-by: w@rren <w@rren.dev>

Co-authored-by: w@rren <w@rren.dev>

* GN-130 Fix invisible white close button

* Scrim flicker fix

Co-authored-by: John Davey <johndavey72@users.noreply.github.com>

* GN-115 Add IE11 compatible e.key string for escape key

* GN-115 Fix bug in copy

* GN-115 Add Esc to ESCAPE_KEYS for IE11 support

* Communities link update

* Fix concatenated links

* Correct public involvement link (again)

* GN-137 Add tests (#158)

* Uncommented tests

* GN-137 Add unit tests for dropdown component

* Updated browserslist & caniuse

* NavLinks test WIP

* Trying to test WIP

* GN-137 Fix tests for tracked link

* GN-137 Update 'Proposed' to 'Awaiting development'

* GN-137 Skip failing test - enzyme mocking hooks issue

* GN-137 Fix or skip failing tests due to enzyme react hooks testing issues

Co-authored-by: w@rren <w@rren.dev>

* GN-154 Button styling

Including GN-155 GN-153

* GN-115 Add data-tracking attrs for Standards and Indicators dropdown

* Alpha current style override

Co-authored-by: John Davey <johndavey72@users.noreply.github.com>

Co-authored-by: Eleanor Mollett <eleanor.mollett@gmail.com>
Co-authored-by: John Davey <66066685+johndavey72@users.noreply.github.com>
Co-authored-by: John Davey <john.davey@nice.org.uk>
Co-authored-by: Ian Routledge <ian.routledge@nice.org.uk>
Co-authored-by: Ian Routledge <ian@ediblecode.com>
Co-authored-by: John Davey <johndavey72@users.noreply.github.com>
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

No branches or pull requests