Skip to content

Add a tabbed panel UI for showing examples in multiple languages. #10088

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

Merged
merged 18 commits into from
Jun 20, 2025

Conversation

kolchfa-aws
Copy link
Collaborator

Closes #1926 Add a tabbed panel UI for showing examples in multiple languages.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Comment on lines 45 to 51
nav.addEventListener('scroll', (e) => {
if (nav.scrollTop > 0) {
versionPanel.classList.add('nav-shadow');
} else {
versionPanel.classList.remove('nav-shadow');
}
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs debouncing; in its current shape it could drastically impact performance.

kolchfa-aws and others added 3 commits June 19, 2025 17:18
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Co-authored-by: Miki <miki@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
@kolchfa-aws
Copy link
Collaborator Author

Thanks so much for reviewing, @AMoo-Miki! I addressed your comments.

@kolchfa-aws kolchfa-aws merged commit 8e196ca into main Jun 20, 2025
6 checks passed
akshansh-modi pushed a commit to akshansh-modi/documentation-website that referenced this pull request Jul 2, 2025
…ensearch-project#10088)

* first solution

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Working tabs and copy button

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Working tabs with copy and copy as curl

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Working tabs with buttons and language specification

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Final working version

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Make vale ignore code blocks

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Update block ingores regex

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Final version with old and new style buttons working

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Make code blocks scrollable

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* No gap in buttons

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Add more languages and move buttons up

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Add all supported languages and formatting guide entry

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Clean up comments

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Remove tabbed panel testing

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Code review feedback

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Update assets/js/listener.js

Co-authored-by: Miki <miki@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* Simplify if logic

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

---------

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Miki <miki@amazon.com>
Signed-off-by: apple <akshanshmodi2002@gmail.com>
epugh pushed a commit to o19s/documentation-website that referenced this pull request Jul 2, 2025
…ensearch-project#10088)

* first solution

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Working tabs and copy button

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Working tabs with copy and copy as curl

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Working tabs with buttons and language specification

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Final working version

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Make vale ignore code blocks

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Update block ingores regex

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Final version with old and new style buttons working

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Make code blocks scrollable

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* No gap in buttons

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Add more languages and move buttons up

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Add all supported languages and formatting guide entry

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Clean up comments

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Remove tabbed panel testing

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Code review feedback

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

* Update assets/js/listener.js

Co-authored-by: Miki <miki@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>

* Simplify if logic

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>

---------

Signed-off-by: Fanit Kolchina <kolchfa@amazon.com>
Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com>
Co-authored-by: Miki <miki@amazon.com>
Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
@kolchfa-aws kolchfa-aws deleted the code-examples branch July 9, 2025 15:31
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.

[DOC] Doc site: Create a REST API section with client language support
2 participants