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

Only working when cursor is in first / left / index=0 pane #82

Closed
luckman212 opened this issue Apr 24, 2021 · 12 comments
Closed

Only working when cursor is in first / left / index=0 pane #82

luckman212 opened this issue Apr 24, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@luckman212
Copy link

Describe the bug
Typical layout might be split pane, Edit on left and Preview on right. This is how I usually work, and probably many others. BUT, if this gets reversed (preview left, edit right) strange things happen with Advanced Tables.

To Reproduce

  1. Put edit pane on left
  2. Make a new table
  3. Start mucking around with it
  4. Swap preview & edit panes.
  5. Muck some more...
  6. It's broken

Expected behavior
Functions should work regardless of pane configuration.

Video

CleanShot.2021-04-24.at.15.16.12.mp4

Desktop (please complete the following information):

  • OS: macOS 11.2.3
  • Obsidian Version: 0.12.1
  • Advanced Tables Version: 0.12.2
@luckman212 luckman212 added bug Something isn't working needs-review A newly created issue that has not yet been processed labels Apr 24, 2021
@luckman212
Copy link
Author

luckman212 commented Apr 24, 2021

One more example, this time 3 identical edit panes...

CleanShot.2021-04-24.at.15.25.54.mp4

@luckman212 luckman212 changed the title Only working when Edit pane is first / on left / index=0 etc. Only working when cursor is in first / left / index=0 pane Apr 24, 2021
@awalvie
Copy link

awalvie commented Apr 26, 2021

Yup, facing the same issue as well.

@lgyz
Copy link

lgyz commented Apr 30, 2021

me too.

@tgrosinger
Copy link
Owner

Hmm, this is a tricky one. I'm having trouble reproducing this behavior. I did once get it to not delete the right row, but otherwise it's behaving normally no matter how many panes are open.

I'll try to dig into this more.

@luckman212
Copy link
Author

Thanks @tgrosinger Just checking- when you're trying to repro, are you positioning the cursor in a pane that isn't the left-most?

@tgrosinger
Copy link
Owner

Yes, I am trying it from a pane one the right (if two or three panes) or middle (if three panes).

@luckman212
Copy link
Author

@tgrosinger thanks for looking. Hmm, so weird because for me this is so simple to reproduce every time. I wonder what's different about our environments?

For testing purposes, I created a brand new vault with ZERO customizations or plugins. All I did was disable Safe Mode, install AT (ver 0.12.3) and created a couple of test notes. See linked video (sorry it's a bit long, I am posting some annotations below if you want to just skip to the bugged parts).

0:29 - nothing happens when delete column button is pressed

0:38 - after leaving and returning to the note, delete column button errors that we're not in a table cell (we are)
(variations of this continue thru ~1:19)

1:36-1:38 - shows nonworking vs working behavior when editing in right vs left pane

2:05-2:32 - shows odd behavior where clicking 'delete column' actually deletes a cell's contents instead, and also does something strange to the editor where the left vs right panes no longer have the same buffer content even though they are linked

2:37-2:54 - clicking 'delete row' (on 'dog') deletes the wrong data (seems to delete TWO rows below and leave a blank row) and again causes the buffer to be inconsistent between all linked panes

3:08-3:19 - clicked 'delete row' and TWO rows are deleted

3:44-4:00 - more nonfunctional AT toolbar clicks, no errors in Console or Notice toasts

4:06 - delete row again deleting 2 rows of data plus the word "Hello" which lies OUTSIDE of the table, and causing left pane to go out of sync

5:08 - pressing 'insert row' also deletes a row (bottom row) of data

video (too large for GitHub issues): https://dsc.cloud/b854da/CleanShot-2021-05-03-at-08.53.02.mp4

@luckman212
Copy link
Author

Just an update, I just re-tested this with the newly-minted Obsidian 0.12.2. Was hoping this was a weird upstream thing (which it still might be!) but—still bugged.

@luckman212
Copy link
Author

@tgrosinger Sorry to be a nag. 😞
Is there anything I can do to help track this down? I am assuming it's something to do with this commit (Update to new Obsidian Editor interface)

@tgrosinger
Copy link
Owner

I managed to reproduce this. It appears that it will work when running commands from the command palette. It's just the toolbar that is incorrect because it is caching a reference to the editor.

I'll get a fix out for this shortly.

@tgrosinger
Copy link
Owner

Thanks for all your help tracking this down @luckman212

@tgrosinger tgrosinger removed the needs-review A newly created issue that has not yet been processed label May 6, 2021
@luckman212
Copy link
Author

Beautiful! Thank you @tgrosinger for this fix. Just loaded it up and confirmed that it's working perfectly now. Enjoy the coffees! ☕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants