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

Use interleaved style #124

Merged
merged 2 commits into from
Dec 8, 2023
Merged

Use interleaved style #124

merged 2 commits into from
Dec 8, 2023

Conversation

Athozus
Copy link
Member

@Athozus Athozus commented Dec 7, 2023

As suggested in #120 by @nonfreegithub, I made a small script to generate interleaved style by putting > chars before each new line.

I'm making a pull request in case some features/details are requested, notably for formspec visualization, even if it's hard, if it's a well-demanded feature, then I can work on it.

Note that it uses a local function interleaveMsg(), because the code is shared for both replying (all)/forwarding.

I let you a screenshot anyway.
screenshot_20231207_220431

@Athozus Athozus added the Enhancement New feature or request label Dec 7, 2023
@Athozus Athozus added this to the 1.4.0 milestone Dec 7, 2023
@nonfreegithub
Copy link
Contributor

nice!

ui/message.lua Outdated Show resolved Hide resolved
Copy link
Member

@S-S-X S-S-X left a comment

Choose a reason for hiding this comment

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

Could maybe add extra line feed or two for replies so that there's always empty space to write actual reply. But this would require decision about how to exactly do it, for interleaved replies we've no idea what lines should actually stay together and what parts could have empty space in between.
Simply adding line feed at beginning or end would just encourage top-posting or bottom-posting so that probably isn't very good idea if you'd like to actually encourage interleaved style.

Not doing anything is also viable option, that leaves decision to user and it is easier to add extra lines than remove those so not doing anything besides what's already done might actually even be best for UX.

Forwarding wont really need that functionality at all so better to be able to skip it there, it is way harder to clean it up than manually add line breaks on editor if needed (and most of time not needed at all for forwards).

Additionally empty space at beginning and end could probably be always trimmed when message is actually sent or stored but maybe think about that later, it could be potential simple improvement but isn't exactly needed here.

Looks good to me. Fine tuning, if needed, can be done later.

@Athozus
Copy link
Member Author

Athozus commented Dec 8, 2023

I was making a functional colorizer for interleaving (replacing > by grey shades) but minetest.colorize() doesn't work properly in text areas. It will be added when that will be fixed.

Then, I merge.

@Athozus Athozus merged commit 77de24e into master Dec 8, 2023
20 checks passed
@Athozus Athozus linked an issue Dec 8, 2023 that may be closed by this pull request
@S-S-X
Copy link
Member

S-S-X commented Dec 9, 2023

I was making a functional colorizer for interleaving (replacing > by grey shades) but minetest.colorize() doesn't work properly in text areas. It will be added when that will be fixed.

Remeber that this will add invisible control characters into message and while text areas can show colored text those are not handled very well within minetest text editor. You'd probably want to wait until you can update minimum minetest version for mod.conf to be at least what is latest well tested version where text editors work without flaws (like issues with selecting text and stepping over control characters with keyboard).

Then you'd want to force anyone still using older engine to update to new tested minetest version, so that might take bit more time than just minetest release wher this would get fixed.

@Athozus Athozus deleted the interleaved-style branch April 15, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: use Interleaved style response style instead of Top posting
3 participants