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

Improve consistency of Item Sheet display #4833

Merged
merged 3 commits into from
Dec 31, 2024
Merged

Improve consistency of Item Sheet display #4833

merged 3 commits into from
Dec 31, 2024

Conversation

Fyorl
Copy link
Contributor

@Fyorl Fyorl commented Dec 5, 2024

This brings the Item sheet in-line with the V2 Actor sheet in terms of consistency around editability in Edit vs. Play mode. Form fields are now disabled in Play mode, and will now show any enchanted values, where before it was not possible to see them. Switching the sheet to edit mode will make the fields editable, with their source values displayed, avoiding the issue of potentially persisting enchantment-modified values, or making changes that do not visually update due to being enchantment-modified.

The sheets will now default to opening in Edit mode also, where appropriate, as most contexts where the Item sheet is opened imply editability (e.g. the right-click context menu on Actor sheets is labelled 'edit', and opening an Item from the sidebar is assumed for editing purposes). Contexts where the Item is not editable, such as a locked compendium, or when viewing an Item on an Actor with Observer permissions, the sheet will display in Play mode as Edit mode is not available in those contexts.

I've also improved a few areas of styling that were not displaying correctly in a disabled context.

image

image

@Fyorl Fyorl added ui User interface related features or bugs ux User experience related features or bugs labels Dec 5, 2024
@Fyorl Fyorl requested a review from arbron December 5, 2024 18:40
@Fyorl Fyorl self-assigned this Dec 5, 2024
@Fyorl Fyorl added this to the D&D5E 4.2.0 milestone Dec 5, 2024
@krbz999
Copy link
Contributor

krbz999 commented Dec 5, 2024

Probably closes #4809. :)

@Fyorl
Copy link
Contributor Author

Fyorl commented Dec 5, 2024

Probably closes #4809. :)

Well it would if I had known about that issue, but it at least provides a clear way to address it. I've pushed a fix for that now, and I imagine there will be a few other places where the source vs. enchantment-modified data is being mixed together that we will have to squash as we find them.

@krbz999
Copy link
Contributor

krbz999 commented Dec 5, 2024

mixed together that we will have to squash as we find them.

I took the liberty of doing a quick browse, and most fields are only contextually hidden, which should be fine. Only contender is the Area fieldset of a spell item, but I think it's gucci.

Copy link
Collaborator

@arbron arbron left a comment

Choose a reason for hiding this comment

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

The sheets look good.

I have a concern about opening all sheets in edit mode particularly for classes/background/species items. Because they only have one description that means that people opening those sheets sees the item's raw description, rather than the enriched description. Could be fine I suppose.

less/v2/forms.less Show resolved Hide resolved
less/v2/forms.less Outdated Show resolved Hide resolved
@Fyorl
Copy link
Contributor Author

Fyorl commented Dec 6, 2024

I have a concern about opening all sheets in edit mode particularly for classes/background/species items. Because they only have one description that means that people opening those sheets sees the item's raw description, rather than the enriched description. Could be fine I suppose.

You are right, this probably needs some more thought. At the very least it should open in Edit mode if you are deliberately accessing it via the 'edit' context menu option. But there are a few other ways to view item sheets, in particular the ones you mentioned which can be opened with left-click directly from the actor sheet. I'm less certain of what the default should be when opening an item from the sidebar tab (or unlocked compendium).

@krbz999
Copy link
Contributor

krbz999 commented Dec 6, 2024

I'm less certain of what the default should be when opening an item from the sidebar tab (or unlocked compendium).

Having messed with similar in a different system, I more often than not ended up wanting Edit Mode primarily on these.

@Fyorl Fyorl requested a review from arbron December 11, 2024 21:26
@Fyorl
Copy link
Contributor Author

Fyorl commented Dec 11, 2024

Item sheets will now open in Edit mode when explicitly choosing 'edit' in a context menu. Things like left-clicking the species item or left-clicking a container to view its contents will open in Play mode. Items in the sidebar and unlocked compendia will also open in Edit mode when opened.

@Fyorl Fyorl requested a review from arbron December 31, 2024 21:22
@Fyorl Fyorl merged commit a06c5cf into 4.2.x Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui User interface related features or bugs ux User experience related features or bugs
Projects
None yet
3 participants