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

Horizontal table of contents implementation #413

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

KashishMistry
Copy link
Member

@KashishMistry KashishMistry commented Mar 14, 2024

Related Item(s)

#402

Changes

  • Added horizontal table of contents component
  • Implementation is such that the config of the project metadata will determine if the table of contents will be horizontal or vertical
  • Updated version to 3.1.2 in package.json

Notes

horizontaltabs

Testing

With this PR, the horizontal table of contents will be shown in the demo (the vertical table of contents has been commented out along with some styles, will be removed before merging) to test the component.


This change is Reviewable

Copy link

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Looks good, just a question but do we want to have the horizontal ToC collapsible?

Just as a reminder will also need to update the package.json version and publish to NPM once everything is tested and working for the editor preview.

Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @KashishMistry)


src/components/story/story-content.vue line 4 at r1 (raw file):

    <div class="items-stretch">
        <!-- :class="{ flex: !$props.config?.tocOrientation || $props.config?.tocOrientation === 'vertical' }" -->
        <!-- v-if="$props.config?.tocOrientation === 'horizontal'" -->

Blocking until ready to merge

Copy link
Member

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

Awesome work, looks great! I noticed that when you click on one of the chapters, part of the content is blocked by the ToC. We may need to tweak the scrollToChapter function to account for the height of the ToC element to get around this.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @KashishMistry)

@KashishMistry KashishMistry force-pushed the horizontal_tabs branch 2 times, most recently from 53e39a1 to 013439d Compare March 20, 2024 20:06
Copy link
Member Author

@KashishMistry KashishMistry left a comment

Choose a reason for hiding this comment

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

Donethanks (for the scrolling issue).

Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @RyanCoulsonCA)

Copy link
Member

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @KashishMistry)

@KashishMistry
Copy link
Member Author

Some formatting changes made to align table of contents and set css properties dynamically

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 4 files at r1, 3 of 4 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @KashishMistry)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @KashishMistry)

Copy link
Member

@dnlnashed dnlnashed left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 4 files at r1, 3 of 4 files at r4, 1 of 1 files at r5, 1 of 1 files at r6, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @KashishMistry)

@KashishMistry KashishMistry force-pushed the horizontal_tabs branch 2 times, most recently from 3d3265e to 91011ca Compare March 27, 2024 18:48
Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @KashishMistry)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @KashishMistry)


src/components/story/story-content.vue line 3 at r7 (raw file):

<template>
    <div class="items-stretch">
        <!-- :class="{ flex: !$props.config?.tocOrientation || $props.config?.tocOrientation === 'vertical' }" -->

blocking until merge

Copy link
Member

@RyanCoulsonCA RyanCoulsonCA left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 4 files at r4, 1 of 1 files at r6, 2 of 2 files at r7, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @KashishMistry)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r9, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @KashishMistry)

@yileifeng yileifeng merged commit 8e27256 into ramp4-pcar4:main Apr 2, 2024
3 checks passed
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.

4 participants