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

raidboss: Support for objects in trigger outputStrings #5861

Merged
merged 21 commits into from
Nov 2, 2023

Conversation

quisquous
Copy link
Owner

This is #5551, with some additional changes on top to resolve a few conversations.

Closes #5551.

@quisquous
Copy link
Owner Author

@valarnin Sorry to step on your patch, but I wanted to get this in while it was on my mind since there's a bunch of changes after this that would be good to make.

@valarnin
Copy link
Collaborator

All good, I'm fine with you taking it over. This fell a bit to the wayside due to IRL obligations.

@quisquous
Copy link
Owner Author

All good, I'm fine with you taking it over. This fell a bit to the wayside due to IRL obligations.

Yeah, I figured! Did you want to take a look at the changes?

Copy link
Collaborator

@valarnin valarnin left a comment

Choose a reason for hiding this comment

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

Also as an in-general comment, it feels kind of bad to be adding even more code to popup-text.ts when that file is already so massive, but I'm not sure if it's feasible to offload the new code to something else.

job?: Job;
id?: string;
name: string;
nick: string;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Most triggers currently use shortName which is why I included it here to begin with. It seems that nick is taking a dual role/default to shortName logic path here which may be counterintuitive since everything else here should be a concrete value.

It may make sense to include both here instead, and have the default be nick still, so that users have the option of still using shortName for specific triggers?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm not sure what you mean by this, or by concrete value. data.ShortName the function is both "first name" and "nickname substitution". Users don't really know anything about "short name" as a function and I felt like "nick" better summed up what it did.

What would both options be? Would shortName just be firstName? Would nick be firstName if it didn't have a substitution? I'm not sure when you would ever want to pick between these.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My original thought was that shortName would be firstName, yes. But on further reflection I don't think this is really a requirement.

My thought process originally was that a given field should be "concrete" as in the field shouldn't vary depending on config values, meaning that nick should always be a specified nickname or blank, and shortName would always be firstName. But that's probably not very intuitive to the end user.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Gotcha.

I think we could leave the nick field blank if there's no nick and then also have the default field be the short name and it would have the same end result for a user who picks "nick". However, I don't think end users will notice this or be able to do anything with that change either?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, I think this is fine as-is. As I said in my last comment, I think that keeping nick as nickname ?? firstName is more user-friendly here.

Maybe it also makes sense to add firstName as a separate field but I feel like the user should be able to just set someone's nickname to their first name if they wanted to anyways.

Copy link
Owner Author

@quisquous quisquous Nov 2, 2023

Choose a reason for hiding this comment

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

Also, I do think this is not something that folks writing triggers will deal with explicitly, at least re: party members. (Maybe if there's some other object type, they would.) And so I think we should feel somewhat free to change what this looks like in the future along with the options if that makes sense.

Edit: I could imagine adding some extra options for something to differentiate multiple jobs, e.g. "MNK 2" vs "MNK FirstName"

resources/party.ts Outdated Show resolved Hide resolved
resources/util.ts Outdated Show resolved Hide resolved
ui/raidboss/popup-text.ts Outdated Show resolved Hide resolved
Copy link
Owner Author

@quisquous quisquous left a comment

Choose a reason for hiding this comment

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

Also as an in-general comment, it feels kind of bad to be adding even more code to popup-text.ts when that file is already so massive, but I'm not sure if it's feasible to offload the new code to something else.

Agreed, but also it seems like a preexisting problem that can be solved in a different PR.

resources/party.ts Outdated Show resolved Hide resolved
job?: Job;
id?: string;
name: string;
nick: string;
Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm not sure what you mean by this, or by concrete value. data.ShortName the function is both "first name" and "nickname substitution". Users don't really know anything about "short name" as a function and I felt like "nick" better summed up what it did.

What would both options be? Would shortName just be firstName? Would nick be firstName if it didn't have a substitution? I'm not sure when you would ever want to pick between these.

quisquous added a commit that referenced this pull request Nov 4, 2023
github-actions bot pushed a commit that referenced this pull request Nov 4, 2023
github-actions bot pushed a commit that referenced this pull request Nov 4, 2023
quisquous added a commit that referenced this pull request Nov 4, 2023
quisquous added a commit that referenced this pull request Nov 4, 2023
github-actions bot pushed a commit that referenced this pull request Nov 4, 2023
github-actions bot pushed a commit that referenced this pull request Nov 4, 2023
quisquous added a commit that referenced this pull request Nov 4, 2023
quisquous added a commit that referenced this pull request Nov 4, 2023
github-actions bot pushed a commit that referenced this pull request Nov 4, 2023
github-actions bot pushed a commit that referenced this pull request Nov 4, 2023
quisquous added a commit that referenced this pull request Nov 4, 2023
quisquous added a commit that referenced this pull request Nov 4, 2023
Followup to #5861.

There's no "output strings" in oopsy, but it does
use ShortName in a few places. Move this over to
data.party.member(x).toString() in order to potentially
support an oopsy option for how to display names.
quisquous added a commit that referenced this pull request Nov 4, 2023
Followup to #5861.

This changes some logic for mit tracking and raise tracking to use
full names instead of short names when storing and comparing, only
using the shortened version for output.

This also creates the party tracker earlier so that it can be
passed to all the things that want to use it, and so all of oopsy
can indirect through `PartyTracker` to find out short names.
quisquous added a commit that referenced this pull request Nov 4, 2023
Followup to #5861.

There's no "output strings" in oopsy, but it does use ShortName in a few
places. Move this over to data.party.member(x).toString() in order to
potentially support an oopsy option for how to display names.

This also changes some logic for mit tracking and raise tracking to use
full names instead of short names when storing and comparing, only using
the shortened version for output.

This also creates the party tracker earlier so that it can be passed to
all the things that want to use it, and so all of oopsy can indirect
through `PartyTracker` to find out short names.
quisquous added a commit that referenced this pull request Nov 4, 2023
quisquous added a commit that referenced this pull request Nov 5, 2023
quisquous added a commit that referenced this pull request Nov 5, 2023
github-actions bot pushed a commit that referenced this pull request Nov 5, 2023
github-actions bot pushed a commit that referenced this pull request Nov 5, 2023
quisquous added a commit that referenced this pull request Nov 9, 2023
Followup to #5861.

There's no "output strings" in oopsy, but it does use ShortName in a few
places. Move this over to data.party.member(x).toString() in order to
potentially support an oopsy option for how to display names.

This also changes some logic for mit tracking and raise tracking to use
full names instead of short names when storing and comparing, only using
the shortened version for output.

This also creates the party tracker earlier so that it can be passed to
all the things that want to use it, and so all of oopsy can indirect
through `PartyTracker` to find out short names.
github-actions bot pushed a commit that referenced this pull request Nov 9, 2023
Followup to #5861.

There's no "output strings" in oopsy, but it does use ShortName in a few
places. Move this over to data.party.member(x).toString() in order to
potentially support an oopsy option for how to display names.

This also changes some logic for mit tracking and raise tracking to use
full names instead of short names when storing and comparing, only using
the shortened version for output.

This also creates the party tracker earlier so that it can be passed to
all the things that want to use it, and so all of oopsy can indirect
through `PartyTracker` to find out short names. 2cc271d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants