-
Notifications
You must be signed in to change notification settings - Fork 479
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
Rename poetry.rb functions #51956
Rename poetry.rb functions #51956
Conversation
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.
The changes here look good, especially after chatting through with Alice offline.
The term standalone_app
initially threw me off because I was expecting that to refer to "bigger" apps like spritelab vs applab. Seeing that we only use this term in the context of SpriteLab/Poetry has feeling good that we're not overloading the term to mean different things in different context.
@molly-moen, I'm thinking you chose this label when we first looked into subtypes, so I know I've seen it a bunch already. Could you remind me how you interpret the term "standalone app"?
@mikeharv I interpret "standalone app" as the configuration for a project that can be run via a |
@molly-moen Thanks for explaining!
Agreed on both points! |
# not in the list of poems for the subtype. | ||
def sanitize_default_poem | ||
self.default_poem = nil if Poetry.subtypes_with_poems.exclude?(standalone_app_name) || | ||
Poetry.poem_keys_for_subtype(standalone_app_name).exclude?(default_poem) | ||
Poetry.poem_list_keys_for_standalone_app(standalone_app_name).exclude?(default_poem) |
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.
nit: I think it would be a bit cleaner to name these poem_keys_for_standalone_app
and poems_for_standalone_app
, because a plural implies a list.
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.
Sure - sounds good. Will update
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.
And just to clarify, did you mean poems_keys_for_standalone_app
or poem_keys_for_standalone_app
?
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.
poem_keys
, because the list is of keys
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.
LGTM, one naming nit but it's a matter of preference :)
Rename poetry.rb functions
This PR renames two functions within
poetry.rb
:poems_for_subtype
topoem_list_for_standalone_app
poem_keys_for subtype
topoem_list_keys_for_standalone_app
.Poetry
has 3 subtypes: 'poetry', 'poetry_hoc', and 'time_capsule'. However, inpoetry.rb
, subtype is referred to asstandalone_app
.The two functions mentioned above are renamed to clarify their purpose and maintain more consistency in naming.
This is a follow-up to this PR.
Links
Testing story
I tested locally by opening new 'poetry', 'time_capsule', and 'poetry_hoc' projects and confirming there were no changes to the poem lists. I also viewed poem lists in the Poetry HOC levels.
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Checklist: