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

Get rid of error popup and show errors inline in REPL #1461

Closed
byorgey opened this issue Aug 24, 2023 · 0 comments · Fixed by #1487
Closed

Get rid of error popup and show errors inline in REPL #1461

byorgey opened this issue Aug 24, 2023 · 0 comments · Fixed by #1487
Labels
C-Low Hanging Fruit Ideal issue for new contributors. L-Error reporting Reporting language or runtime errors to the player. T-UI Involves the user interface. Z-User Experience This issue seeks to make the game more enjoyable to play.

Comments

@byorgey
Copy link
Member

byorgey commented Aug 24, 2023

In case you have invalid (can not parse/typecheck) REPL prompt and hit Enter, we show an error popup.

I propose we instead save it in history and show the error like output. I.e. like GHCi does it.

Originally posted by @xsebek in #713 (comment)

Prerequisites: #60 , #11

@byorgey byorgey added Z-User Experience This issue seeks to make the game more enjoyable to play. C-Low Hanging Fruit Ideal issue for new contributors. T-UI Involves the user interface. L-Error reporting Reporting language or runtime errors to the player. labels Aug 24, 2023
mergify bot pushed a commit that referenced this issue Sep 3, 2023
- Add scrollbars on both the inventory and info panels
- Get rid of `. . .` at top and bottom of info panel, since we now have scrollbar as a visual indicator when there is more content
- Allow scrolling the REPL history (closes #60)
    - PgUp/PgDown can be used to scroll (Shift+PgUp/Dn were not recognized on my system)
    - Hitting any other key causes the view to jump back to the very bottom
    - A computation finishing + printing an output also causes the view to jump to the bottom
    - The REPL history is cached so that it only gets re-rendered whenever a new history entry (i.e. input or output) is added; this is needed since the history could get quite large.
- Also, fix the height of the key hint menus to 2 lines, even when the panel-specific menu (second line) is blank, so the world panel does not keep resizing as we move the focus between panels.

Thanks to @jtdaugherty for releasing `brick-1.10` with a new ability to specify blank space to the side of scrollbars; see jtdaugherty/brick#484 .

Also towards #1461 .
@mergify mergify bot closed this as completed in #1487 Sep 5, 2023
mergify bot pushed a commit that referenced this issue Sep 5, 2023
Closes #1461.  Errors which used to be displayed in a pop-up window (parse errors, type errors) are now displayed inline in the REPL window instead.

- Get rid of the pop-up error dialog
- Also fix a bug introduced in #1481 where the REPL history would not be properly cleared when first starting a new scenario, because the old cache was still being used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Low Hanging Fruit Ideal issue for new contributors. L-Error reporting Reporting language or runtime errors to the player. T-UI Involves the user interface. Z-User Experience This issue seeks to make the game more enjoyable to play.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant