Skip to content

chore(docs): SDK page cleanup — sidebar, examples, tab naming, code structure#275

Closed
marythought wants to merge 6 commits into
mainfrom
chore/274-tdf-example-placement
Closed

chore(docs): SDK page cleanup — sidebar, examples, tab naming, code structure#275
marythought wants to merge 6 commits into
mainfrom
chore/274-tdf-example-placement

Conversation

@marythought

@marythought marythought commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses all 4 tasks from #274:

  1. Sidebar order — rearranged to logical flow: Architecture → Authentication → Quickstart → TDF → Policy → Obligations → Authorization → Discovery → Troubleshooting
  2. TDF example placement — moved usage examples directly below method signatures for CreateTDF, LoadTDF, IsValidTdf, and BulkDecrypt
  3. JS/TS tab naming — standardized all tabs to "JavaScript" (was mixed "TypeScript"/"Javascript"/"JavaScript")
  4. Code example structure — Policy and Obligations pages now use setup+snippets pattern:
    • Shared Setup section at top with client init for each language
    • Stripped SDK boilerplate from all inline examples and imported code samples (~1000 lines removed)
    • Extracted Obligations into its own page (uses a different service accessor pattern)

Closes #274

Test plan

  • Verify sidebar order in surge preview
  • Verify TDF page examples appear below signatures
  • Verify tab labels all say "JavaScript"
  • Verify Policy page Setup section renders with proper tabs
  • Verify Obligations page renders correctly as a standalone page
  • Spot-check code snippets still make sense without boilerplate

🤖 Generated with Claude Code

Rearrange CreateTDF, LoadTDF, IsValidTdf, and BulkDecrypt sections so
usage examples appear directly after the method signature, before the
parameter tables. This makes it easier to see how to call each method
without scrolling past reference details first.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought
marythought requested review from a team as code owners April 7, 2026 00:49
Rearrange sidebar: Architecture → Authentication → Quickstart → TDF →
Policy → Authorization → Discovery → Troubleshooting. Puts system
understanding and auth setup before the quickstart and core operations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

📄 Preview deployed to https://opentdf-docs-pr-275.surge.sh

@marythought marythought changed the title chore(docs): move TDF examples below signatures chore(docs): SDK page cleanup — example placement and sidebar order Apr 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the docs/sdks/tdf.mdx documentation by reordering sections for the createTDF, LoadTDF, IsValidTdf, and BulkDecrypt functions. Technical details including parameters, return types, and error descriptions have been moved to follow the code examples to improve readability and flow. I have no feedback to provide as there were no review comments to evaluate.

marythought and others added 2 commits April 6, 2026 17:54
Some tabs used "TypeScript" or "Javascript" (lowercase s) while the
majority used "JavaScript". Standardize all to "JavaScript" for
consistency across SDK pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…age (#274)

- Add Setup section to Policy page with client init for Go, Java, JS
- Strip SDK initialization boilerplate from all inline code examples
  and imported code sample files — snippets now assume the shared setup
- Extract Obligations into its own page (different service accessor)
  with its own Setup section (Go + JS only, no Java support yet)
- Bump sidebar positions: Obligations=6, Authorization=7, Discovery=8,
  Troubleshooting=10

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought marythought changed the title chore(docs): SDK page cleanup — example placement and sidebar order chore(docs): SDK page cleanup — sidebar, examples, tab naming, code structure Apr 7, 2026
Aligns with the Setup section naming used on the Policy and Obligations
pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

❌ Surge preview build failed — no preview was deployed. Check the workflow logs for details.

Once the build passes, the preview will be at: https://opentdf-docs-pr-275.surge.sh

Common cause: If the build failed on vendored YAML validation, run the following locally and commit the result:

npm run update-vendored-yaml
git add specs/
git commit -m "chore(deps): update vendored OpenAPI specs"

Show base imports for Go, Java, and JS so readers know where `sdk`,
`SDKBuilder`, and `AuthProviders` come from before hitting the first
code example.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@marythought

Copy link
Copy Markdown
Contributor Author

Superseded by a fresh PR rebased on main after #270 merged.

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@marythought has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 49 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 7 minutes and 49 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7d13fe31-770b-4da6-b72b-dc30ff4f24f3

📥 Commits

Reviewing files that changed from the base of the PR and between 2fd6c69 and a37e739.

📒 Files selected for processing (18)
  • code_samples/authorization/get_decision.mdx
  • code_samples/authorization/get_entitlements.mdx
  • code_samples/policy_code/create_attribute.mdx
  • code_samples/policy_code/create_namespace.mdx
  • code_samples/policy_code/create_subject_condition_set.mdx
  • code_samples/policy_code/create_subject_mapping.mdx
  • code_samples/policy_code/list_attributes.mdx
  • code_samples/policy_code/list_namespaces.mdx
  • code_samples/policy_code/list_subject_mapping.mdx
  • docs/sdks/authentication.mdx
  • docs/sdks/authorization.mdx
  • docs/sdks/discovery.mdx
  • docs/sdks/obligations.mdx
  • docs/sdks/platform-client.mdx
  • docs/sdks/policy.mdx
  • docs/sdks/quickstart/_category_.json
  • docs/sdks/tdf.mdx
  • docs/sdks/troubleshooting.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/274-tdf-example-placement

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

chore(docs): SDK page cleanup — sidebar order, example placement, JS/TS naming

1 participant