Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

[search] polyfill search component to catch errors #165

Merged
merged 6 commits into from
Aug 12, 2019
Merged

Conversation

katydecorah
Copy link
Contributor

@katydecorah katydecorah commented Aug 7, 2019

While reviewing Sentry errors, I noticed that the search component is throwing errors in older browser versions like Firefox 44.

I built this PR locally and tested on /geographic-analytics:

  • IE 11 works
    image

  • Firefox 44 works (The search component works , too. I'm not concerned about that weird icon positioning since it doesn't appear in the latest versions of Firefox.)
    image

You can test this PR by:

  1. npm install
  2. npm run build
  3. Opening another repo to test locally, like geographic-analytics, and replacing the dr-ui version number in package.json with the path to your local dr-ui repo: "@mapbox/dr-ui": "file:/Users/katydecorah/Documents/GitHub/dr-ui/pkg",
  4. run npm install (you may need to delete node_modules first) on the tester repo and then npm start
  5. open browserstack with Firefox 44 to confirm the site loads locally.

@katydecorah katydecorah requested a review from a team August 7, 2019 21:01
Copy link
Contributor

@colleenmcginnis colleenmcginnis left a comment

Choose a reason for hiding this comment

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

@katydecorah I tested this in /ios-sdk and it works as expected on npm start. I get the following error when running npm run build:

../dr-ui/pkg/back-to-top-button/index.js
Module build failed: ReferenceError: Unknown plugin "babel-plugin-transform-react-remove-prop-types" specified in "base" at 4, attempted to resolve relative to "/path/to/folder/dr-ui/pkg/back-to-top-button"
    at Array.map (<anonymous>)

@katydecorah
Copy link
Contributor Author

@colleenmcginnis looks like adding babel-plugin-transform-react-remove-prop-types here as a dependency fixed that error. I'm not exactly sure why yet. My first guess is that it's a peer dependency for one of the two packages also installed in this PR.

Copy link
Contributor

@colleenmcginnis colleenmcginnis left a comment

Choose a reason for hiding this comment

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

I retested this with the most recent changes and the build works as expected!

Katy DeCorah added 2 commits August 12, 2019 09:15
* master:
  [BackToTopButton] use `window.scroll(x-coord, y-coord)`  (#167)
@katydecorah katydecorah merged commit 7a393c9 into master Aug 12, 2019
@katydecorah katydecorah deleted the polyfill branch August 12, 2019 13:17
katydecorah pushed a commit that referenced this pull request Aug 12, 2019
* master:
  [Search] Enable babel polyfill on `Search` component (#165)
  [BackToTopButton] use `window.scroll(x-coord, y-coord)`  (#167)
  Create a note "flavor" for new products or features (#162)
  [docs] Update webhook staging urls (#161)
katydecorah pushed a commit that referenced this pull request Aug 12, 2019
* master:
  [Search] Enable babel polyfill on `Search` component (#165)
  [BackToTopButton] use `window.scroll(x-coord, y-coord)`  (#167)
katydecorah pushed a commit that referenced this pull request Aug 14, 2019
* master:
  [babel] Add babel config to helpers and plugins, add eslint plugins (#164)
  [Search] Enable babel polyfill on `Search` component (#165)
  [BackToTopButton] use `window.scroll(x-coord, y-coord)`  (#167)
katydecorah pushed a commit that referenced this pull request Aug 14, 2019
* master:
  [babel] Add babel config to helpers and plugins, add eslint plugins (#164)
  [Search] Enable babel polyfill on `Search` component (#165)
  [BackToTopButton] use `window.scroll(x-coord, y-coord)`  (#167)
katydecorah pushed a commit that referenced this pull request Aug 16, 2019
* master: (24 commits)
  0.20.1
  Prepare 0.20.1
  0.20.0
  Prepare 0.20.0
  Prevent src/components/syntax-highlighters from being adding to pkg
  Update WarningImage in GLWrapper
  Update CHANGELOG.md
  Add syntax highlighting functions (#172)
  Add `GLWrapper` and `DemoIframe` components. (#166)
  compress svg
  update *-image themes and clean up svg, make IE11 friendly, set default `size` & make it a number
  [babel] Add babel config to helpers and plugins, add eslint plugins (#164)
  [Search] Enable babel polyfill on `Search` component (#165)
  [BackToTopButton] use `window.scroll(x-coord, y-coord)`  (#167)
  Create a note "flavor" for new products or features (#162)
  [docs] Update webhook staging urls (#161)
  0.19.3
  Update CHANGELOG.md
  [Note] replace Object.assign with a function (#159)
  0.19.2
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants