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

[wb1733.1.adddocsfixdocslinks] Add docs for new WB Testing and fix links #2276

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

somewhatabstract
Copy link
Member

Summary:

This adds docs for the new boundary adapter and the new renderHookStatic call to the Wonder Blocks Testing package. It also updates the overview to explain some things about Wonder Blocks Testing Core.

In addition, I discovered that most of the intra-story links in MDX files were not working. After some investigation and discussion with @jandrade, it was determined that the markdown link format just doesn't currently work properly and that converting to <a> links with slightly changed href works as needed.

I used some regexp to convert from the markdown version to the markup version.

1. Markdown to markup

Find: \[((?:[^\[\]])+)\]\((/docs/[^\)]+)\)
Replace: <a href="./?path=$2">$1</a>

2. Add the missing leading packages- to the links

Seems that we reorganized the docs so that there's now a new top-level grouping that the URL needs to include when using the anchor approach.
Find: <a href="./\?path=/docs/(?!packages)
Replace: <a href="./?path=/docs/packages-

Issue: WB-1733

Test plan:

yarn start:storybook and check the new docs and changed links are working

@somewhatabstract somewhatabstract self-assigned this Jul 17, 2024
@somewhatabstract somewhatabstract requested a review from a team July 17, 2024 20:11
Copy link

changeset-bot bot commented Jul 17, 2024

⚠️ No Changeset found

Latest commit: 5209309

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Jul 17, 2024

Gerald

Required Reviewers
  • @Khan/wonder-blocks for changes to __docs__/wonder-blocks-accordion/accessibility.mdx, __docs__/wonder-blocks-core/_overview_.mdx, __docs__/wonder-blocks-core/exports.use-force-update.mdx, __docs__/wonder-blocks-core/exports.use-is-mounted.mdx, __docs__/wonder-blocks-core/exports.use-latest-ref.mdx, __docs__/wonder-blocks-core/exports.use-on-mount-effect.mdx, __docs__/wonder-blocks-core/exports.use-online.mdx, __docs__/wonder-blocks-core/exports.use-pre-hydration-effect.mdx, __docs__/wonder-blocks-core/exports.use-render-state.mdx, __docs__/wonder-blocks-data/_overview_.mdx, __docs__/wonder-blocks-data/_overview_graphql.mdx, __docs__/wonder-blocks-data/_overview_ssr_.mdx, __docs__/wonder-blocks-data/_overview_testing_.mdx, __docs__/wonder-blocks-data/exports.abort-inflight-requests.mdx, __docs__/wonder-blocks-data/exports.data-error.mdx, __docs__/wonder-blocks-data/exports.data-errors.mdx, __docs__/wonder-blocks-data/exports.data.mdx, __docs__/wonder-blocks-data/exports.fetch-tracked-requests.mdx, __docs__/wonder-blocks-data/exports.get-gql-request-id.mdx, __docs__/wonder-blocks-data/exports.gql-error.mdx, __docs__/wonder-blocks-data/exports.gql-errors.mdx, __docs__/wonder-blocks-data/exports.gql-router.mdx, __docs__/wonder-blocks-data/exports.has-tracked-requests-to-be-fetched.mdx, __docs__/wonder-blocks-data/exports.intercept-requests.mdx, __docs__/wonder-blocks-data/exports.intialize-hydration-cache.mdx, __docs__/wonder-blocks-data/exports.purge-caches.mdx, __docs__/wonder-blocks-data/exports.purge-hydration-cache.mdx, __docs__/wonder-blocks-data/exports.scoped-in-memory-cache.mdx, __docs__/wonder-blocks-data/exports.serializable-in-memory-cache.mdx, __docs__/wonder-blocks-data/exports.shared-cache.mdx, __docs__/wonder-blocks-data/exports.status.mdx, __docs__/wonder-blocks-data/exports.track-data.mdx, __docs__/wonder-blocks-data/exports.use-cached-effect.mdx, __docs__/wonder-blocks-data/exports.use-gql.mdx, __docs__/wonder-blocks-data/exports.use-hydratable-effect.mdx, __docs__/wonder-blocks-data/exports.use-server-effect.mdx, __docs__/wonder-blocks-data/exports.use-shared-cache.mdx, __docs__/wonder-blocks-data/exports.when-client-side.mdx, __docs__/wonder-blocks-data/types.cached-response.mdx, __docs__/wonder-blocks-data/types.error-options.mdx, __docs__/wonder-blocks-data/types.fetch-policy.mdx, __docs__/wonder-blocks-data/types.gql-context.mdx, __docs__/wonder-blocks-data/types.gql-fetch-fn.mdx, __docs__/wonder-blocks-data/types.gql-fetch-options.mdx, __docs__/wonder-blocks-data/types.gql-operation-type.mdx, __docs__/wonder-blocks-data/types.gql-operation.mdx, __docs__/wonder-blocks-data/types.raw-scoped-cache.mdx, __docs__/wonder-blocks-data/types.response-cache.mdx, __docs__/wonder-blocks-data/types.result.mdx, __docs__/wonder-blocks-data/types.scoped-cache.mdx, __docs__/wonder-blocks-data/types.valid-cache-data.mdx, __docs__/wonder-blocks-form/_overview_.mdx, __docs__/wonder-blocks-popover/popover.accessibility.mdx, __docs__/wonder-blocks-testing/_overview_.mdx, __docs__/wonder-blocks-testing/_overview_fixtures.mdx, __docs__/wonder-blocks-testing/_overview_mocking.mdx, __docs__/wonder-blocks-testing/_overview_test_harness.mdx, __docs__/wonder-blocks-testing/_overview_utilities.mdx, __docs__/wonder-blocks-testing/exports.fixtures.mdx, __docs__/wonder-blocks-testing/exports.harness-adapters.mdx, __docs__/wonder-blocks-testing/exports.hook-harness.mdx, __docs__/wonder-blocks-testing/exports.make-hook-harness.mdx, __docs__/wonder-blocks-testing/exports.make-test-harness.mdx, __docs__/wonder-blocks-testing/exports.mock-fetch.mdx, __docs__/wonder-blocks-testing/exports.mock-gql-fetch.mdx, __docs__/wonder-blocks-testing/exports.render-hook-static.mdx, __docs__/wonder-blocks-testing/exports.respond-with.mdx, __docs__/wonder-blocks-testing/exports.settle-controller.mdx, __docs__/wonder-blocks-testing/exports.test-harness.mdx, __docs__/wonder-blocks-testing/types.fetch-mock-fn.mdx, __docs__/wonder-blocks-testing/types.fetch-mock-operation.mdx, __docs__/wonder-blocks-testing/types.fixture-fn.mdx, __docs__/wonder-blocks-testing/types.fixture-props.mdx, __docs__/wonder-blocks-testing/types.get-props-options.mdx, __docs__/wonder-blocks-testing/types.gql-fetch-mock-fn.mdx, __docs__/wonder-blocks-testing/types.gql-mock-operation.mdx, __docs__/wonder-blocks-testing/types.mock-response.mdx, __docs__/wonder-blocks-testing/types.test-harness-adapter.mdx, __docs__/wonder-blocks-testing/types.test-harness-adapters.mdx, __docs__/wonder-blocks-testing/types.test-harness-config.mdx, __docs__/wonder-blocks-testing/types.test-harness-configs.mdx, __docs__/wonder-blocks-timing/_overview_.mdx, __docs__/wonder-blocks-timing/migration.mdx, __docs__/wonder-blocks-timing/types.ischedule-actions.mdx, __docs__/wonder-blocks-timing/with-action-scheduler.mdx

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

Copy link
Contributor

github-actions bot commented Jul 17, 2024

npm Snapshot: NOT Published

🤕 Oh noes!! We couldn't find any changesets in this PR (48be0b6). As a result, we did not publish an npm snapshot for you.

Copy link
Contributor

github-actions bot commented Jul 17, 2024

A new build was pushed to Chromatic! 🚀

https://5e1bf4b385e3fb0020b7073c-lxacpwdvub.chromatic.com/

Chromatic results:

Metric Total
Captured snapshots 0
Tests with visual changes 0
Total stories 428
Inherited (not captured) snapshots [TurboSnap] 340
Tests on the build 340

Copy link
Contributor

github-actions bot commented Jul 17, 2024

Size Change: 0 B

Total Size: 94 kB

ℹ️ View Unchanged
Filename Size
packages/wonder-blocks-accordion/dist/es/index.js 3.78 kB
packages/wonder-blocks-banner/dist/es/index.js 1.53 kB
packages/wonder-blocks-birthday-picker/dist/es/index.js 1.57 kB
packages/wonder-blocks-breadcrumbs/dist/es/index.js 887 B
packages/wonder-blocks-button/dist/es/index.js 4.03 kB
packages/wonder-blocks-cell/dist/es/index.js 2.01 kB
packages/wonder-blocks-clickable/dist/es/index.js 3.06 kB
packages/wonder-blocks-core/dist/es/index.js 3.45 kB
packages/wonder-blocks-data/dist/es/index.js 6.24 kB
packages/wonder-blocks-dropdown/dist/es/index.js 14.1 kB
packages/wonder-blocks-form/dist/es/index.js 5.1 kB
packages/wonder-blocks-grid/dist/es/index.js 1.36 kB
packages/wonder-blocks-i18n/dist/es/index.js 4.51 kB
packages/wonder-blocks-icon-button/dist/es/index.js 2.99 kB
packages/wonder-blocks-icon/dist/es/index.js 828 B
packages/wonder-blocks-labeled-field/dist/es/index.js 72 B
packages/wonder-blocks-layout/dist/es/index.js 1.82 kB
packages/wonder-blocks-link/dist/es/index.js 2.27 kB
packages/wonder-blocks-modal/dist/es/index.js 5.36 kB
packages/wonder-blocks-pill/dist/es/index.js 1.64 kB
packages/wonder-blocks-popover/dist/es/index.js 4.71 kB
packages/wonder-blocks-progress-spinner/dist/es/index.js 1.52 kB
packages/wonder-blocks-search-field/dist/es/index.js 1.3 kB
packages/wonder-blocks-switch/dist/es/index.js 1.94 kB
packages/wonder-blocks-testing-core/dist/es/index.js 3.64 kB
packages/wonder-blocks-testing/dist/es/index.js 1.13 kB
packages/wonder-blocks-theming/dist/es/index.js 693 B
packages/wonder-blocks-timing/dist/es/index.js 1.8 kB
packages/wonder-blocks-tokens/dist/es/index.js 1.74 kB
packages/wonder-blocks-toolbar/dist/es/index.js 855 B
packages/wonder-blocks-tooltip/dist/es/index.js 6.78 kB
packages/wonder-blocks-typography/dist/es/index.js 1.23 kB

compressed-size-action

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.21%. Comparing base (4bebd48) to head (5209309).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2276      +/-   ##
==========================================
+ Coverage   94.30%   95.21%   +0.91%     
==========================================
  Files         251      251              
  Lines       29666    29666              
  Branches     1686     2442     +756     
==========================================
+ Hits        27976    28246     +270     
+ Misses       1685     1402     -283     
- Partials        5       18      +13     

see 38 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4bebd48...5209309. Read the comment docs.

Copy link
Member Author

Choose a reason for hiding this comment

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

note: New section for WBT exports that aren't part of the existing fixtures, mocking, or test harness frameworks.

Copy link
Member

@jandrade jandrade left a comment

Choose a reason for hiding this comment

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

Looks and works great! thanks for fixing all the broken links 👏 🚢

@somewhatabstract somewhatabstract merged commit f2e11af into main Jul 17, 2024
16 checks passed
@somewhatabstract somewhatabstract deleted the wb1733.1.adddocsfixdocslinks branch July 17, 2024 22:34
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.

3 participants