-
Notifications
You must be signed in to change notification settings - Fork 234
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
[#79] Hide name/desc for items not identified #1696
[#79] Hide name/desc for items not identified #1696
Conversation
I presume gamemasters need to edit both the identified and unidentified item descriptions. Can we provide a better UX for that than needing to toggle the identified state in order to have access to the relevant text field? |
@Fyorl question, I was still working on aaclayton latest comment (maybe I should have replied to that before?) but I imagine you closed this 'cause the v10-dev branch is closed, can't I just rebase this on whatever the new branch is ? Is the intention to move away from what I've been working on onto a different solution (in system or in core, as requested on the issue linked by andrew -- though my understanding of his reply was that this was The solution for now--to have systems implement their own solutions) |
The |
I seem to be lacking some permissions to change the target of these PRs and reopen them. Are you able to edit it and change the target to |
I don't seem to be able to change it here, but on a repo I have full ownership I can change the target branch from the Edit button that lets you change the PR title. Have you tried that one ? It should turn the target label into a selectable. Questionable UX xD (EDIT: for me, it just lets me change the title here, not the target branch) |
f9ce0c9
to
1b01c79
Compare
f209aaa
to
087575b
Compare
Following @aaclayton's advice, this is my current iteration, but I'm not sold on the UI with both descriptions together. Also, I see a divide between how only the "Unidentified {type}" is shown as name and showing both descriptions. that is for GMs; regular users just see one description: Alternatively, something like this could be done for the name: There's also the fact that the title of the item sheet still shows the full name, but I am unable to change it somehow. I tried changing the |
I get what you mean about the appearance of having both descriptions showing at the same time. I wonder if changing the styling of the And just to make sure, these kind of dividers are what I'm referring to: |
As for the title problem, the |
Having two text editors in the same place seems like the way to go for ease of use. However, the front page of the item sheet is notoriously annoying to work with, what with its height always resetting to less than the minimum with every change (or when dragging the sheet). If the inputs are stacked on each other vertically, the minimum height of the sheet needs an adjustment more than ever (or at minimum needs to stop resetting its height when dragged or when changing tabs). Bit of a tangent, but I agree with Kaelad's idea. |
087575b
to
b2785ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @returns {string} The localized name to show for the unidentified item. | ||
* @private | ||
*/ | ||
export function unidentifiedName(item) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I thought they were in the system! Thanks for the review, I will look into it asap (I am moving this weekend though so it might take some time to catch up)
templates/items/consumable.hbs
Outdated
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'DND5E.ItemName' }}"/> | ||
{{else}} | ||
<input disabled name="ignored" type="text" value="{{ localize (dnd5e-unidentifiedName item) }}"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled inputs are automatically ignored by form processing, so you don't need to worry about the name here.
<input disabled name="ignored" type="text" value="{{ localize (dnd5e-unidentifiedName item) }}"/> | |
<input type="text" value="{{ localize (dnd5e-unidentifiedName item) }}" disabled> |
templates/items/equipment.hbs
Outdated
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'DND5E.ItemName' }}"/> | ||
{{else}} | ||
<input disabled name="ignored" type="text" value="{{ localize (dnd5e-unidentifiedName item) }}"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<input disabled name="ignored" type="text" value="{{ localize (dnd5e-unidentifiedName item) }}"/> | |
<input type="text" value="{{ localize (dnd5e-unidentifiedName item) }}" disabled> |
{{#unless isIdentifiable}} | ||
{{editor descriptionHTML target="system.description.value" | ||
button=true editable=editable engine="prosemirror" collaborate=false}} | ||
{{/unless}} | ||
{{#if showIdentifiedDesc}} | ||
{{editor descriptionHTML target="system.description.value" | ||
button=true editable=editable engine="prosemirror" collaborate=false}} | ||
{{/if}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can just be merged into a single editor instance:
{{#unless isIdentifiable}} | |
{{editor descriptionHTML target="system.description.value" | |
button=true editable=editable engine="prosemirror" collaborate=false}} | |
{{/unless}} | |
{{#if showIdentifiedDesc}} | |
{{editor descriptionHTML target="system.description.value" | |
button=true editable=editable engine="prosemirror" collaborate=false}} | |
{{/if}} | |
{{#if (or showIdentifiedDesc (not isIdentifiable)}} | |
{{editor descriptionHTML target="system.description.value" | |
button=true editable=editable engine="prosemirror" collaborate=false}} | |
{{/if}} |
Adding |
{{/if}} | ||
{{#if showUnidentifiedDesc}} | ||
{{#if isGM}} | ||
<hr class="flex0"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this <hr>
just for spacing? It doesn't seem to show up visually. If so, it would probably be better to do with with CSS on the unidentified description box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this <hr>
was a remnent from showing a line that I removed, it will be gone.
{{#if isGM}} | ||
<hr class="flex0"> | ||
<div class="unidentified-description"> | ||
<h3 class="flex0" >{{localize "DND5E.UnidentifiedDesc"}}</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.flex0
doesn't seem to be a class in the CSS, is this doing anything?
templates/items/weapon.hbs
Outdated
<input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'DND5E.ItemName' }}"/> | ||
{{else}} | ||
<input disabled name="ignored" type="text" value="{{ localize (dnd5e-unidentifiedName item) }}"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<input disabled name="ignored" type="text" value="{{ localize (dnd5e-unidentifiedName item) }}"/> | |
<input type="text" value="{{ localize (dnd5e-unidentifiedName item) }}" disabled> |
Open delete dialogue to confirm deletion of active effects on the effects page.
…fect.mjs Require confirmation to delete effects.
…-effect.mjs Revert "Require confirmation to delete effects."
@ccjmk Support for editing multiple items has been merged into the 2.4 branch. If you wanted to update this using those updates then we can take a look at this for either 2.4 or the next version :) |
@arbron I sure would love to! I need to get my dev env up to speed probably because it's been like a year since I touched anything foundry-related, but I'll definitely want to move this forward. I'll hit you on discord if that's ok once I have my local branch updated and conflicts fixed. |
…s description.unidentified instead; GM sees true name and both descriptions
263f3be
to
fe7afa4
Compare
Resolves #79
Used
system.identified
to toggle betweendescription.value
anddescription.unidentified
and between showing true name or a masked 'Unidentified XYZ' faked name in item sheet (weapon/equipment/consumable) and actor inventory.Possible further steps:
mystery-man
or saving a different icon akin of the description treatment.