Skip to content

In stepper, respect the number-display format of the language. #246

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikesperber
Copy link
Member

To that end, call the underlying pretty-print-print-handler instead of format, and transform write-special'ed number markup into the corresponding snip.

To that end, call the underlying pretty-print-print-handler
instead of format, and transform write-special'ed number markup
into the corresponding snip.
@mikesperber mikesperber requested a review from jbclements April 29, 2025 10:58
@mikesperber
Copy link
Member Author

I should not that the snips don't look very good, but this needs to be fixed in the framework.

@rfindler
Copy link
Member

rfindler commented Apr 29, 2025 via email

@mikesperber
Copy link
Member Author

Is there a place to add a test case for this one? Robby

A meaningful test for this would have to look at the actual live UI of the stepper - I haven't seen that yet. (Or am I wrong, @jbclements ?)

@jbclements
Copy link
Contributor

@mike no, there's no way to look at the live GUI output that I know of, though I can add a manual checklist item to manual-tests. You probably have an easy example that I can test?

Broadly speaking: this definitely seems like an improvement.

Copy link
Contributor

@jbclements jbclements left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It certainly seems like the existing code ignored the existing pretty-print-size-hook, and I can't see why that would be a good thing. The direct use of format with ~s definitely seems less likely to be correct.

@mikesperber
Copy link
Member Author

@rfindler Any chance you could help with making the number snips use the same font size as the stepper-sub-text%. I've tried doing set-style on the same style as in the stepper-text%'s snip, to no avail.

@rfindler
Copy link
Member

rfindler commented May 8, 2025

In addition to the font size, the number snips don't follow the settings in the language dialog for the language-dialog version of BSL. When I change the setting to "Mixed fractions" in the language dialog customization of BSL, I still see repeating-decimals printing in the stepper. (It might depend on my preferences, tho, so you might need to use "Repeating decimals" to get the bad behavior.)

@rfindler
Copy link
Member

rfindler commented May 8, 2025

Also, when I am trying things out, sometimes I see "placeholder26196" in the stepper where the fraction is supposed to go. I'm not sure how to make this happen but maybe it has to do with whether or not the language-based BSL is chosen when DrRacket starts up?

@mikesperber
Copy link
Member Author

@rfindler For me, the stepper respects the preferences. (And the code for that is unchanged.)
With the placeholder thing you're seeing - the patch only fiddles with number markup, AFAICS. Do you have a reproducible recipe?

Also, do you have any advice on how to fix font size?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants