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

Added nesting highlights, popup notes, and translation links. #3

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Erhannis
Copy link

@Erhannis Erhannis commented Jan 2, 2022

The output showed a lot of useful-looking information, but in a form that was hard to grasp.
So I added transparent colored backgrounds by ()/[]/<> to visually show nesting,
moved the translations to hover-over tooltips,
and made the lojban words link to sutysisku for a full translation.

The highlights are a bit garish, and maybe not as easy-to-understand as they could be, but I'm not immediately sure how to improve them.
I did just have a thought, though, so I'll probably push another commit in a minute.
The colors will likely remain garish, though.

Do you think there should be a checkbox to toggle between the old/new modes, or anything?

Testing it on a few sentences of text, I do feel like the new interface significantly improves understandability.

@Erhannis
Copy link
Author

Erhannis commented Jan 2, 2022

Made the highlights nest spatially, which I think helps a little more. I think I'm done. Lemme know if there's anything that needs to be changed.

@lagleki
Copy link
Contributor

lagleki commented Jan 2, 2022 via email

@rlpowell
Copy link
Member

rlpowell commented Jan 3, 2022

Here's the before:

image

and here's the after:

image

I'm leaving the site up with Erhannis's version so people can look at it.

I'm not a huge fan myself, I'm sorry to say. I don't like moving all the bits that make jbofihe unique into tooltips; it seems like it's trying too hard to be camxes.lojban.org . But even if we're going to do that, I definitely don't like the proliferation of asterisks; there's just a lot of them. I don't know what visual indicator of "there's a hidden tooltip here" I'd prefer, though.

Having said all that, I'm happy to go with whatever other people prefer; I don't consider myself a gatekeeper here.

@lagleki
Copy link
Contributor

lagleki commented Jan 3, 2022 via email

@Erhannis
Copy link
Author

Erhannis commented Jan 3, 2022

Ok; I've added a dropdown to switch between expanded and contracted mode. I've defaulted it to contracted mode, because, well, I'm biased. ;) BUT I can switch the default to the old way, if you'd prefer.

I'll look again into moving the tooltips onto the words themselves - I'm not keen on spending a huge amount of time trying to parse html, so I'll probably only give it the next 45 min, but we'll see if I can figure anything out.

…re it makes sense. I don't trust it will gracefully handle all feasible inputs, though, so I also added a 'condensed (robust)' mode.
@Erhannis
Copy link
Author

Erhannis commented Jan 3, 2022

Ok, I think I've figured out a way to move the tooltips onto words-to-be-translated, where such exist. Some tooltips are, e.g., notes about the role a word plays, or implied words, etc., so those I've left as asterisks.

I had trouble with it at first because jbofihe sometimes omits a translation <I> block entirely, which made the post-processed result all gunked up. I don't entirely trust there not to be any more gotchas, so while the word-tooltip change has been applied to the condensed mode, I've also left the (IMO likely more robust) previous asterisked mode in as condensed (robust), for use if normal condensed is gives weird results. I don't KNOW of any input that would produce such output, though.

I also added a plain mode, returning the plain result of jbofihe, because it was useful in debugging. It may not be useful to the average user, though.

I can remove the plain and/or condensed (robust) modes, if you'd prefer.

@Erhannis
Copy link
Author

Erhannis commented Jan 3, 2022

Actually, speaking of the words that jbofihe doesn't translate - any idea why that is? I notice a lot of cv'v words aren't touched, like ji'a, la'e, de'e, and ze'u. In fact, it may be ONLY words of that form that are omitted, as far as I've seen.

@lagleki
Copy link
Contributor

lagleki commented Jan 3, 2022 via email

@lagleki
Copy link
Contributor

lagleki commented Jan 3, 2022 via email

@Erhannis
Copy link
Author

Erhannis commented Jan 4, 2022

Ok; I've started a server on http://18.237.58.79:8080/ . I can give it a proper url if needed; not sure what your intended purpose is.

@lagleki
Copy link
Contributor

lagleki commented Jan 4, 2022 via email

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.

None yet

3 participants