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

feat(page): Add page navigation button #2142

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

wodenx
Copy link
Contributor

@wodenx wodenx commented Jun 30, 2023

Changes

  • Adds a 'Nav' button to the main menu which allows editor to navigate from one page to another.

Test Instructions

  • Test on both vital-demo and vital-demo-next
  • Launch edit environment
  • Click 'nav' button
    • Use filter to fitler list of pages
    • click on a page to navigate there

Known Issues

  • in NextJS, when you create a new page it does not appear in nav until you refresh.
  • In Gatsby, when you create a new page, the dialog closes immediately without offering the "go to new page" button.

@vercel
Copy link

vercel bot commented Jun 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bodiless-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2023 0:32am
bodiless-js-examples ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2023 0:32am
bodiless-js-gatsby ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2023 0:32am
bodiless-js-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2023 0:32am
bodiless-js-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 14, 2023 0:32am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
bodiless-js-perf-gatsby ⬜️ Ignored (Inspect) Jul 14, 2023 0:32am
bodiless-js-perf-next ⬜️ Ignored (Inspect) Jul 14, 2023 0:32am

@vercel
Copy link

vercel bot commented Jun 30, 2023

Someone is attempting to deploy a commit to the JNJ Demo Account Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Thank you for creating a pull request on GitHub! We appreciate your contribution to our repository.

In order to enable our tests to run on your changes, we kindly ask that you wait until one of our repository members adds the ready-to-test label to your pull request. (Please request on the GitHub issue you are addressing.) This will ensure that our testing process runs smoothly and we can quickly verify the changes you've made.

Thank you for your understanding and we look forward to reviewing your changes soon!

VancheeZze
VancheeZze previously approved these changes Jun 30, 2023
@@ -166,6 +167,7 @@ const getStaticProps = async ({ params }: getServerSideProps) => {
try {
const indexPath = findComponentPath(...pagesBasePath, ...realSlug.split('/').filter(Boolean));
if (indexPath === null) {
// eslint-disable-next-line no-console
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor — there is already a disable rule for it at the top.

@@ -0,0 +1,28 @@
export type TreeNode = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add License for new file

url?: string,
};

export function pathsToTree(paths: string[] = []) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use arrow function for consistent?


const FolderTree: FC<FolderTreeProps> = props => {
const { ComponentFormList } = usePageMenuOptionUI();
// const ComponentFormList = 'ul';
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove debug line

dewen
dewen previously approved these changes Jun 30, 2023
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

Playwright Test Results

215 tests   138 ✔️  1h 36m 3s ⏱️
  16 suites    15 💤
    2 files      62

For more details on these failures, see this check.

Results for commit b55f47e.

♻️ This comment has been updated with latest results.

@@ -52,6 +53,10 @@ const usePageMenuOptionUI = () => {
addClasses('bl-italic'),
)(ComponentFormLink as ComponentType<StylableProps>);

const PageTreeLink = addClasses(
'bl-cursor-pointer bl-text-xs bl-block hover:bl-underline hover:bl-text-yellow-500'
)(A);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not ComponentFormLink?

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.

Site Map Navigation Button
5 participants