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

fix: navigate to page from athena when result is for a block #2025

Merged
merged 9 commits into from Feb 21, 2022

Conversation

sid597
Copy link
Collaborator

@sid597 sid597 commented Feb 17, 2022

No description provided.

@vercel
Copy link

vercel bot commented Feb 17, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/athens-research/athens/CfW82xM6uWmtjs2kPjeaqefg1Q7L
✅ Preview: https://athens-git-fork-sid597-fix-athena-bugs-athens-research.vercel.app

Copy link
Collaborator

@tangjeff0 tangjeff0 left a comment

Choose a reason for hiding this comment

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

  • Code is correct, but I think we should actually navigate-uid for blocks.
    • Make sure this works for both enter and click handlers.
  • Can you try writing e2e tests for this?
  • Let me think about what :editing/uid should do going forward. I think it is being called twice right now.
  • Deleting a page leads to an error:

@sid597
Copy link
Collaborator Author

sid597 commented Feb 17, 2022

Code is correct, but I think we should actually navigate-uid for blocks

I was thinking about this too but it was not clear to me what happens when we navigate to a child block whose parent is closed.

Make sure this works for both enter and click handlers.

I tested click handlers are working for athena navigation

Can you try writing e2e tests for this?

Yup

@tangjeff0
Copy link
Collaborator

I was thinking about this too but it was not clear to me what happens when we navigate to a child block whose parent is closed.

If you go directly to the child block as a block-page, it doesn't matter if parent is closed.

@sid597
Copy link
Collaborator Author

sid597 commented Feb 17, 2022

If you go directly to the child block as a block-page, it doesn't matter if parent is closed.

Oh ok so the intention is to open as block-page will do this, I had the wrong impression that we would like to navigate to block on its parent page.

@sid597
Copy link
Collaborator Author

sid597 commented Feb 17, 2022

Deleting a page leads to an error:

This was introduced by monitoring I think we should add this there and track there

@tangjeff0
Copy link
Collaborator

Oh ok so the intention is to open as block-page will do this, I had the wrong impression that we would like to navigate to block on its parent page.

That would be cool, but I think that requires more UX thought, similar to open-close in the case of collaboration. For now, I'd rather zoom in directly on the block than to go to the page and not know where the block is, in the case that it's deeply nested.

Comment on lines +35 to +41
await page.fill('[placeholder="Find or Create Page"]', 'welcome');
// Press ArrowDown
await page.press('[placeholder="Find or Create Page"]', 'ArrowDown');
// Press ArrowDown
await page.press('[placeholder="Find or Create Page"]', 'ArrowDown');
// Press Enter
await page.press('[placeholder="Find or Create Page"]', 'Enter');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems like common operations, good place to create util functions.

test/e2e/athena-navigation.spec.ts Outdated Show resolved Hide resolved
test/e2e/athena-navigation.spec.ts Outdated Show resolved Hide resolved
@filipesilva filipesilva merged commit b55d0e9 into athensresearch:main Feb 21, 2022
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.

None yet

3 participants