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

added functional component example to simulate doc #2248

Merged
merged 3 commits into from
Oct 6, 2019

Conversation

paulvollmer
Copy link
Contributor

added one more example to demonstrate the use at a functional component and how you can test an onChange event

ljharb and others added 2 commits October 6, 2019 10:24
…ple to simulate doc

added one more example to demonstrate the use at a functional component and how you can test an onChange event
@ljharb ljharb merged commit 3576b61 into enzymejs:master Oct 6, 2019
@paulvollmer paulvollmer deleted the patch-1 branch October 10, 2019 19:20
@paulvollmer
Copy link
Contributor Author

@ljharb i try to update the gh-pages docs by running the yarn docs:publish command but i cannot send a PR because of a different commit history. to let the command run i changed the github repo urls from ...airbnb/enzyme.git to ...paulvollmer/enzyme.git. of course i could push to my fork but github cannot create a PR.

can you publish the docs?

the command looks also very hacky for me and the empty commit at the begin of the command chain should be the problem.

is there a reason why you overwrite the gh-pages branch history? if it is only because of make things done then i can work on this issue. small hacktoberfest task for me...


screenshot if i try to create a PR
Screenshot 2019-10-10 at 22 29 45

@ljharb
Copy link
Member

ljharb commented Oct 10, 2019

@paulvollmer the published docs are only changed during a release of enzyme itself, and should not be updated otherwise.

The improvement I'd like to make to docs publishing is that each version's docs should be persistent - ie, what i'd like is each enzyme release to generate a new commit on top of gh-pages, that adds both a v1.2.3 directory, and updates the root to be the latest version, without altering previous versions. If that's something you're interested in, I'd be very happy to review that PR.

@paulvollmer
Copy link
Contributor Author

@ljharb okay, i got it.

the docs versioning task is interesting. for me it sounds like having the solution to surf the docs for a specific version.

maybe it make sense to add a select ui to choose which enzyme version you want to surf.

i think it is easy to refactor the script to build and publish to a directory of the name of the latest version. the challenge could be to generate the docs for the past versions. or did enzyme ever used the same docs build process?

@ljharb
Copy link
Member

ljharb commented Oct 15, 2019

That's my thought - that it would default to the latest, but there'd be a dropdown in the corner to switch between versions.

It would be fine to make "fill in the past version" be a one-off script that's only ran once (with the latest build process), to backfill - once it's in place, moving forward, the build script would just have to generate the new version.

ljharb added a commit that referenced this pull request Dec 20, 2019
New Stuff
 - `render`: handle Fiber strings and numbers (#2221)

Fixes
 - `shallow`: Share child context logic between `shallow` and `dive` (#2296)
 - `mount`: `children`: include text nodes ($2269)
 - `mount`: `invoke`: use adapter’s `wrapInvoke` if present (#2158)

Docs
 - `mount`/`shallow`: `closest`/`parent`: Add missing arguments description (#2264)
 - `mount`/`shallow`: fix pluralization of “exist” (#2262)
 - `shallow`/`mount`: `simulate`: added functional component example to simulate doc (#2248)
 - `mount`: `debug`: add missing verbose option flag (#2184)
 - `mount`/`shallow`: `update`: fix semantics description (#2194)
 - add missing backticks to linked method names (#2170)
 - `invoke`: Add missing backticks to end of codeblock (#2160)
 - `invoke`: Fix typo (#2167)
 - Explicit React CSS selector syntax description (#2178)

Meta Stuff
 - [meta] add `funding` field
 - [meta] Update airbnb.io URLs to use https (#2222)
 - [deps] update `is-boolean-object`, `is-callable`, `is-number-object`, `is-string`, `enzyme-shallow-equal`, `array.prototype.flat`, `function.prototype.name`, `html-element-map`, `is-r
egex`, `object-inspect`, `object-is`, `object.entries`, `object.vales`, `raf`, `string.prototype.trim`
 - [dev deps] update `eslint`, `eslint-plugin-import`, `eslint-plugin-markdown`, `eslint-plugin-react`, `safe-publish-latest`, `eslint-config-airbnb`, `rimraf`, `safe-publish-latest`, `k
arma-firefox-launcher`, `babel-preset-airbnb`, `glob-gitignore`, `semver`, `eslint-plugin-jsx-a11y`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants