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

Remove replaceSymbols method, add transform prop #10

Merged
merged 2 commits into from
Aug 20, 2015
Merged

Conversation

brian-c
Copy link
Contributor

@brian-c brian-c commented Aug 13, 2015

This removes the replaceSymbols method and moves its behavior into a transform prop. That way we can pass in the current router so we can generate links in the proper context.

Once this is merged, let's bump the version and publish, and then I'll update zooniverse/Panoptes-Front-End#1408, which closes #8.

@edpaget
Copy link
Contributor

edpaget commented Aug 13, 2015

I'd really prefer the transform to remain as a hardcoded part of the Markdown component, but I do want to pass in the project as a props instead of getting them from the router content. I think it'd be useful to render Markdown with links to subjects/hashtags/users (whatever else we add) from anyplace we use markdown on the site.

@edpaget
Copy link
Contributor

edpaget commented Aug 13, 2015

Also wrt to the Travis failure it seems that occassionally sauce times out waiting for a particular vm or two.

@brian-c
Copy link
Contributor Author

brian-c commented Aug 13, 2015

Hashtags and @-mentions aren't part of Markdown, so I'd argue they don't belong in this component, and if we can avoid binding our components to Panoptes, I think we should.

This'll work anywhere on the site with no modification since I'm overriding the default transform function. in that PFE PR.

@edpaget
Copy link
Contributor

edpaget commented Aug 13, 2015

I'd argue they they're part of Zooniverse Markdown, so they really should be included. I don't really see why we wouldn't bind our components to Panoptes, since it'll be the basis for Zooniverse projects for the foreseeable future, and we set out to build components for the Zooniverse instead of a generic React component toolkit.

@edpaget
Copy link
Contributor

edpaget commented Aug 13, 2015

In addition, it's it more flexible to just pass a project when we want project-dependent links instead of having to have them in the URL?

@brian-c
Copy link
Contributor Author

brian-c commented Aug 13, 2015

I don't really get it, since the links that we're generating in the transform step are specific to zooniverse.org.

What interface do you have in mind? <Markdown content="..." router={router} project={project} />?

@edpaget
Copy link
Contributor

edpaget commented Aug 13, 2015

No I'd just pass in <Markdown content="..." project={project}> not sure you'd need the router at all in that case. I'm not sure why we wouldn't links to go back to zooniverse.org?

@aweiksnar
Copy link
Contributor

I think replaceZooniverseSymbols would be cool to export from here, and have as an optional-but-default transform prop, so it'd still be tested, versioned, and supplied in here, but also not enforced on consumers of the lib

@edpaget
Copy link
Contributor

edpaget commented Aug 13, 2015

Yeah I agree with @aweiksnar and I think that was what I proposed on slack.

@edpaget edpaget merged commit bcacd90 into master Aug 20, 2015
@aweiksnar aweiksnar deleted the remove-router branch September 21, 2015 15:13
mcbouslog pushed a commit that referenced this pull request Jan 5, 2024
* Bump eslint from 8.54.0 to 8.56.0 (#2)

Bumps [eslint](https://github.com/eslint/eslint) from 8.54.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.54.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @babel/preset-env from 7.23.3 to 7.23.6 (#5)

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.3 to 7.23.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.6/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump eslint-plugin-import from 2.29.0 to 2.29.1 (#7)

Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.29.0 to 2.29.1.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](import-js/eslint-plugin-import@v2.29.0...v2.29.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump markdown-it-footnote from 3.0.3 to 4.0.0 (#1)

Bumps [markdown-it-footnote](https://github.com/markdown-it/markdown-it-footnote) from 3.0.3 to 4.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-footnote/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-footnote@3.0.3...4.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-footnote
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump markdown-it-sup from 1.0.0 to 2.0.0 (#3)

Bumps [markdown-it-sup](https://github.com/markdown-it/markdown-it-sup) from 1.0.0 to 2.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-sup/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-sup@1.0.0...2.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-sup
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump markdown-it-sub from 1.0.0 to 2.0.0 (#4)

Bumps [markdown-it-sub](https://github.com/markdown-it/markdown-it-sub) from 1.0.0 to 2.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-sub/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-sub@1.0.0...2.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-sub
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump isomorphic-dompurify from 1.9.0 to 1.12.0 (#10)

Bumps [isomorphic-dompurify](https://github.com/kkomelin/isomorphic-dompurify) from 1.9.0 to 1.12.0.
- [Release notes](https://github.com/kkomelin/isomorphic-dompurify/releases)
- [Commits](kkomelin/isomorphic-dompurify@v1.9.0...v1.12.0)

---
updated-dependencies:
- dependency-name: isomorphic-dompurify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/core from 7.23.3 to 7.23.6 (#9)

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.3 to 7.23.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.6/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump markdown-it-container from 3.0.0 to 4.0.0 (#12)

Bumps [markdown-it-container](https://github.com/markdown-it/markdown-it-container) from 3.0.0 to 4.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-container/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-container@3.0.0...4.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-container
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @twemoji/api from 14.1.2 to 15.0.3 (#13)

Bumps [@twemoji/api](https://github.com/jdecked/twemoji) from 14.1.2 to 15.0.3.
- [Release notes](https://github.com/jdecked/twemoji/releases)
- [Commits](jdecked/twemoji@v14.1.2...v15.0.3)

---
updated-dependencies:
- dependency-name: "@twemoji/api"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump markdown-it-emoji from 2.0.2 to 3.0.0 (#8)

* Bump markdown-it-emoji from 2.0.2 to 3.0.0

Bumps [markdown-it-emoji](https://github.com/markdown-it/markdown-it-emoji) from 2.0.2 to 3.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it-emoji/blob/master/CHANGELOG.md)
- [Commits](markdown-it/markdown-it-emoji@2.0.2...3.0.0)

---
updated-dependencies:
- dependency-name: markdown-it-emoji
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* update imports

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jim O'Donnell <[email protected]>

* Bump jsdom from 23.0.0 to 23.0.1 (#14)

Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.0 to 23.0.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](jsdom/jsdom@23.0.0...23.0.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix linter errors

* Upgrade markdown-it from 13.0.1 to 14.0.0 (#15)

markdown-it 14.0.0 is now ESM (with a CJS fallback) and fixes some bugs with `img` alt text strings.
https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md#1400---2023-12-08

* Bump isomorphic-dompurify from 1.12.0 to 2.0.0 (#16)

Bumps [isomorphic-dompurify](https://github.com/kkomelin/isomorphic-dompurify) from 1.12.0 to 2.0.0.
- [Release notes](https://github.com/kkomelin/isomorphic-dompurify/releases)
- [Commits](kkomelin/isomorphic-dompurify@v1.12.0...v2.0.0)

---
updated-dependencies:
- dependency-name: isomorphic-dompurify
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/preset-env from 7.23.6 to 7.23.7 (#17)

Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.6 to 7.23.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.7/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/core from 7.23.6 to 7.23.7 (#19)

Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.6 to 7.23.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @babel/register from 7.22.15 to 7.23.7 (#18)

Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register) from 7.22.15 to 7.23.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.7/packages/babel-register)

---
updated-dependencies:
- dependency-name: "@babel/register"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump chai from 4.3.10 to 5.0.0 (#20)

* Bump chai from 4.3.10 to 5.0.0

Bumps [chai](https://github.com/chaijs/chai) from 4.3.10 to 5.0.0.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md)
- [Commits](chaijs/chai@v4.3.10...v5.0.0)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Upgrade test config to ESM
- change `helper.js` to `helper.mjs`.
- `use` no longer mutates a global `chai` object, which changes how spies are set up.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jim O'Donnell <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@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

Successfully merging this pull request may close these issues.

React Router Warnings
3 participants