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(blocks): prevent indent when already a leaf block, prevent indent and unindent when already a top-level child #209

Closed
tangjeff0 opened this issue Jul 3, 2020 · 6 comments
Assignees
Labels
t/bug type of work

Comments

@tangjeff0
Copy link
Collaborator

No description provided.

@alaq
Copy link
Contributor

alaq commented Jul 3, 2020

Can this issue be assigned to @nthd3gr33 @itsrainingmani and myself @alaq? We are working on a solution together. Thank you!

@tangjeff0
Copy link
Collaborator Author

Can you comment @itsrainingmani so I can also assign this to you?

@itsrainingmani
Copy link
Contributor

Hi Jeff

@nthd3gr33
Copy link
Contributor

nthd3gr33 commented Jul 4, 2020

Found additional unexpected behavior when making the video demo:

Pressing tab on the top-level child:

  • expected behavior: nothing
  • actual behavior: destroys the block

Tested on Dynalist and Roam to double-check that the expected behavior is the same on those platforms.

Should I create a new issue or add this to this issue (my recommendation)?

@tangjeff0
Copy link
Collaborator Author

tangjeff0 commented Jul 4, 2020

Add it to this issue @nthd3gr33. I think you can edit title (and initial description) as well

@nthd3gr33 nthd3gr33 changed the title fix(blocks): prevent indent when already a leaf block, prevent unindent when already a top-level child fix(blocks): prevent indent when already a leaf block, prevent indent and unindent when already a top-level child Jul 6, 2020
@tangjeff0 tangjeff0 mentioned this issue Jul 7, 2020
17 tasks
itsrainingmani added a commit to itsrainingmani/athens that referenced this issue Jul 8, 2020
…nt context (athensresearch#209)

If the node being unindented is the top-level node in the current context, prevent unindent by checking if parent node id is equal to id present in :current-route object.

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
itsrainingmani added a commit to itsrainingmani/athens that referenced this issue Jul 8, 2020
…#209)

A leaf block is a block with block order 0. If the block order is 0, do not indent and return a no-op in the indent event handler

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
itsrainingmani added a commit to itsrainingmani/athens that referenced this issue Jul 8, 2020
…e is no indent or unindent happening (athensresearch#209)

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
itsrainingmani added a commit to itsrainingmani/athens that referenced this issue Jul 8, 2020
…nt context (athensresearch#209)

If the node being unindented is the top-level node in the current context, prevent unindent by checking if parent node id is equal to id present in :current-route object.

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
itsrainingmani added a commit to itsrainingmani/athens that referenced this issue Jul 8, 2020
…#209)

A leaf block is a block with block order 0. If the block order is 0, do not indent and return a no-op in the indent event handler

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
itsrainingmani added a commit to itsrainingmani/athens that referenced this issue Jul 8, 2020
…e is no indent or unindent happening (athensresearch#209)

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
tangjeff0 added a commit that referenced this issue Jul 8, 2020
…ent` and `unindent` when already a top-level child (#228)

* fix(blocks): prevent unindent when already a top-level child in current context (#209)

If the node being unindented is the top-level node in the current context, prevent unindent by checking if parent node id is equal to id present in :current-route object.

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* fix(blocks): prevent indent when already a leaf block (#209)

A leaf block is a block with block order 0. If the block order is 0, do not indent and return a no-op in the indent event handler

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* fix: prevent default browser behavior for tab and shift+tab when there is no indent or unindent happening (#209)

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* fix(blocks) - Refactor indent and unindent event handlers

* Move the block zero check in indent event handler to the on-key-down handler since it doesn't require any re-frame or datascript subscriptions
* Rename context-root to context-root-uid and remove unnecessary comment in unindent event handler
* Use the stricter parent ID to context-root uid check instead of (and parent grandpa) in unindent event handler

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* Add missing devtool devcard deps (#229)

* feat(blocks): Drag n drop v2. use local listeners instead of global. decompose monolith block-el (#232)

* line 524 of blocks. if I use a dispatch, on-drag-end doesn't get called

* feat(blocks): drag and drop PoC for local event handlers. refactor block-el

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
Co-authored-by: Tom H <git@tomisme.com>
Co-authored-by: jeff <tangj1122@gmail.com>
@tangjeff0
Copy link
Collaborator Author

closed by #228

@tangjeff0 tangjeff0 added the t/bug type of work label Jul 12, 2020
korlaism pushed a commit to korlaism/athens that referenced this issue Jul 19, 2021
…ent` and `unindent` when already a top-level child (athensresearch#228)

* fix(blocks): prevent unindent when already a top-level child in current context (athensresearch#209)

If the node being unindented is the top-level node in the current context, prevent unindent by checking if parent node id is equal to id present in :current-route object.

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* fix(blocks): prevent indent when already a leaf block (athensresearch#209)

A leaf block is a block with block order 0. If the block order is 0, do not indent and return a no-op in the indent event handler

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* fix: prevent default browser behavior for tab and shift+tab when there is no indent or unindent happening (athensresearch#209)

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* fix(blocks) - Refactor indent and unindent event handlers

* Move the block zero check in indent event handler to the on-key-down handler since it doesn't require any re-frame or datascript subscriptions
* Rename context-root to context-root-uid and remove unnecessary comment in unindent event handler
* Use the stricter parent ID to context-root uid check instead of (and parent grandpa) in unindent event handler

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>

* Add missing devtool devcard deps (athensresearch#229)

* feat(blocks): Drag n drop v2. use local listeners instead of global. decompose monolith block-el (athensresearch#232)

* line 524 of blocks. if I use a dispatch, on-drag-end doesn't get called

* feat(blocks): drag and drop PoC for local event handlers. refactor block-el

Co-authored-by: Adrien Lacquemant <github@alaq.io>
Co-authored-by: nthd3gr33 <codinginenglish@gmail.com>
Co-authored-by: Tom H <git@tomisme.com>
Co-authored-by: jeff <tangj1122@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug type of work
Projects
None yet
Development

No branches or pull requests

4 participants