clojure-emacs / orchard

A fertile ground for Clojure tooling
Eclipse Public License 1.0
323 stars 54 forks source link

Next/previous sibling functions - refinements #232

Closed vemv closed 3 months ago

vemv commented 3 months ago

Hi @p4v4n , I checked out the recent changes. While it's an improvement over how things were before, there's still some room for refinements.

Let's assume an Inspector object with two pages.

Overall, I find that the correct behavior is that by using next/previous sibling, the user should be able to go smoothly from the first element of the first page to the last element of the last page, no matter how many pages are there in between.

It should also work in the opposite direction (last item of last page to first item of first page).

Normally, if we try to get past boundaries, we should re-render the same inspector instead of returning nil.

The current state of things can be tried in cider master / cider-nrepl latest.

Cheers - V

p4v4n commented 3 months ago

Hey, I missed this notification and also didn't find the time to try the latest changes yet. Thanks for testing the PR and taking it over the finish line.

Some initial thoughts:

vemv commented 3 months ago

Thanks @p4v4n ! It's no issue and the current state is an acceptable intermediate one.

Would look forward to a PR anytime

p4v4n commented 3 months ago

Just a small update. I tried the latest cider and cider-nrepl and tried the latest code and previous-sibling works fine for me across all pages.

Steps I tried to reproduce:

  1. Inspect (range 100) 2. Go to page 4 3. Go down into any element 4. Press '9' 100 times.

It goes back to 0 and stops as expected.

vemv commented 3 months ago

Tried out quickly - you're right!