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

[#2135, #2136] Add multi editor to make additional descriptions editable #2137

Closed
wants to merge 1 commit into from

Conversation

arbron
Copy link
Collaborator

@arbron arbron commented Jan 30, 2023

Creates a new {{multiEditor}} handlebar helper that takes configuration objects (prepared by the {{source}} helper) to display multiple descriptions within a single editor:

Editor.Target.Selection.mov

Also displays the contents of system.description.chat for item chat messages if present to allow for custom chat description.

Resolves #2135
Resolves #2136

@arbron arbron added ui User interface related features or bugs feature request labels Jan 30, 2023
@arbron arbron added this to the D&D5E 2.2.0 milestone Jan 30, 2023
@arbron arbron self-assigned this Jan 30, 2023
@arbron arbron requested a review from Fyorl January 30, 2023 21:11
@ccjmk
Copy link
Contributor

ccjmk commented Feb 4, 2023

I'm interested in using this for #1696 once this PR goes through, it would make for a much neater UX/UI imo.

@arbron arbron modified the milestones: D&D5E 2.2.0, D&D5E 2.3.0 May 13, 2023
@arbron arbron changed the base branch from 2.2.x to 2.3.x July 21, 2023 16:38
@Fyorl Fyorl modified the milestones: D&D5E 2.3.0, D&D5E 2.4.0 Aug 9, 2023
@arbron arbron changed the base branch from 2.3.x to 2.4.x October 20, 2023 22:29
@Fyorl
Copy link
Contributor

Fyorl commented Oct 25, 2023

I think my only hangup at the moment is that I'm not sold on the UI of selecting a description to edit via a drop-down. In some discussions around this feature it was suggested that a slide-toggle might be nice for most cases where there's only two descriptions to choose from. Something like fa-toggle-on and fa-toggle-off. The problem is that what I think will be perhaps the most-used alternative description is the item unidentified description, which unfortunately has 3 descriptions (normal, unidentified, and chat), so a slide-toggle cannot work, and we would need to fall back to a drop-down.

So first maybe we could consider whether we need the chat description at all? Its use case is fairly obvious but it seems like more of a nice-to-have, rather than a necessary feature. I personally quite like the idea of being able to quickly toggle between identified and unidentified description as a DM, that feels like a nice UX to me.

Alternatively, because I also quite liked what @ccjmk proposed in #1696 with the ability to see all descriptions at once, we could potentially do something like an accordion style UI (maybe using the <details> element or something?)

image

Having multiple editors in the same tab can be quite awkward to style, so I would propose that we side-step the issue by having the edit button instead pop out a separate editor dialog that is edit-only mode (similar to how journal page editing works.)

Obviously this is entirely subjective so I am not insisting on anything here but am interested to see if we can iterate on this design at all.

@krbz999
Copy link
Contributor

krbz999 commented Oct 25, 2023

This seems like a use case for tabs.

However, if a pop-out text editor would allow collaboration that is to me 100% the ideal.

@arbron
Copy link
Collaborator Author

arbron commented Oct 25, 2023

@Fyorl Here is a quick prototype of showing all descriptions inline and replacing the whole tab with an editor:

Multiple.Inline.mov

On locked sheets it hides the first header to avoid clutter:

Locked Headers

@Fyorl
Copy link
Contributor

Fyorl commented Oct 26, 2023

@Fyorl Here is a quick prototype of showing all descriptions inline and replacing the whole tab with an editor:

Looks pretty good to me. One minor point of feedback would be to have the edit button always visible so it's more obvious what you need to do in order to edit the description rather than having to hover over it to find out. Otherwise I think we should be good to proceed in this direction.

@arbron
Copy link
Collaborator Author

arbron commented Oct 26, 2023

Closed in favor of a new PR: #2137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request ui User interface related features or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use item's "chat description" if specified Add ability to edit "hidden" descriptions
4 participants