This repository has been archived by the owner. It is now read-only.

Implementation #2

Open
shaunlebron opened this Issue Apr 19, 2017 · 11 comments

Comments

Projects
None yet
1 participant
@shaunlebron
Copy link
Owner

shaunlebron commented Apr 19, 2017

No description provided.

@shaunlebron shaunlebron changed the title Implementation Notes Implementation Apr 19, 2017

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Jul 30, 2017

  • setup parinfer and parinfer-codemirror to start prototyping
  • bad: boxes don't extend far enough to contain inner text
  • bad: cannot differentiate boxes
    • locations of the boxes at the open-parens should be shaped according to the paren type
  • bad: cannot tell how to remove/shift boxes
    • locations of the boxes at the open-parens should have some affordance of control

screen shot 2017-07-30 at 1 20 41 am

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Jul 30, 2017

  • bounds are extended
  • bad: borders cut inward too much when joining back to the close-paren

locus-bounds

commit: shaunlebron/parinfer-codemirror@1c80386

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Jul 30, 2017

  • open parens are shown, feels a little better

locus-openers

commit: shaunlebron/parinfer-codemirror@fb93df5

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Jul 30, 2017

  • close-parens are shown if openers on same line
  • only draw top line for same-line collections
  • try rounded corners to show direction within nested collections
  • bad: round corners dipping into the parens don't align well typographically
  • bad: close-parens never shown for multi-line collections

locus-showinlineclosers

  • maybe: remove bottom borders?
  • maybe: align multi-line box widths when contained
  • maybe: show all close-parens when cursor by paren trail

commit: shaunlebron/parinfer-codemirror@6a085df

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Aug 3, 2017

  • only replace close-parens with boxes for multi-line lists connected to a paren trail
    • good simple and communicates what is normalized code that allows inference
  • unhide paren-trail close-parens when cursor is inside
  • bad: box-drawing still cutting the bottom right corner
  • bad: close-parens hidden when text is selected, obscuring what is being copied

locus-trail-behavior

commit: shaunlebron/parinfer-codemirror@067da37

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Aug 3, 2017

  • only show paren trails when either:
    • cursor or selection end is inside or after a paren trail
    • paren-trail is selected
  • bad: may not be enough affordance for why close-parens appear/disappear

locus-selections

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Aug 3, 2017

  • not bottom right corner cutout
  • bad - the bottom right pocket inside let is weird. Should detect these isolated pockets and extend the blocks to cover them

locus-nocutout

commit: shaunlebron/parinfer-codemirror@46f9214

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Aug 3, 2017

  • bad a bit noisy
    • chris's feedback to remove some of the border
    paper.path([
      'M', open.midx, open.top+r,
      'A', r, r, 0, 0, 1, open.midx+r, open.top,
      'H', wall.right-r,
      'A', r, r, 0, 0, 1, wall.right, open.top+r,
      'V', open.top+5,
      'M', open.midx, close.bottom,
      'V', open.bottom
    ].join(' '));

locus-chris

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Aug 4, 2017

full block widths

locus-fullblock

commit: shaunlebron/parinfer-codemirror@feaa85d

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Aug 4, 2017

with just guides

parinfer-guides

commit: shaunlebron/parinfer-codemirror@8eadb45 (with guides: true)

@shaunlebron

This comment has been minimized.

Copy link
Owner Author

shaunlebron commented Mar 17, 2018

promising idea from @ivanreese:

https://twitter.com/spiralganglion/status/965731142996451329

my thoughts:

As a view, this model seems to work well since indent guides under a letter implies a (. It is missing in your second example, so I think that would fix the ambiguity.
i'd like to mock this up to see how this plays with editing. my goal is NOT to reimplement https://github.com/boxed/indent-clj …, but to keep the syntax and have the editor fold away some parens when indent guides obviate the need for them.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.