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

Custom labels for readability and CLI output #1292

Merged
merged 19 commits into from
Sep 12, 2023

Conversation

Fishbowler
Copy link
Contributor

@Fishbowler Fishbowler commented Jul 28, 2023

Proposed Changes

Builds on the work of @SuperRoach in #1238

Adds a label attribute to a number of commands. This:

  • adds readability to the file as to the purpose of a particular step (especially relevant for tapping on points or vague element selectors)
  • is also returned in the description() method of those commands to be displayed in the CLI output.

I'm a first-timer, so have some outstanding questions:

  • Does this need a Docs PR ready for merge before this can be merged?
  • Is there additional testing that could/should be done?
  • Is partial support for label acceptable, so long as it's documented?

Testing

  • Extended Unit tests
  • Added new Integration test
  • Tested locally by amending my own flows (the reason I'm working on this 😉)

Issues Fixed

Solves #1229 and provides a workaround for #1226

@DannyCork
Copy link

Can we get this reviewed please? Many thanks

@igorsmotto
Copy link
Contributor

igorsmotto commented Aug 28, 2023

Hi there @Fishbowler! Thanks for taking the time to create a Pull Request! Let me check internally with the team regarding your questions and I'll back to you.

Also, I'm curious, Why did you implement only for a partial set of commands? (Instead of all of them?)

@Fishbowler
Copy link
Contributor Author

I did all the ones that seemed sensible. But I've only got my single point of view & use cases. I asked the question since it might go against some design values, rather than being "obviously incomplete".

@igorsmotto
Copy link
Contributor

Hey @Fishbowler! Thanks for your answer - I was wondering if you had found any technical challenges but it seems it was not the case.

I brought this suggestion to the team, and we see this as a big quality-of-life improvement for Maestro users and we want to move forward with this PR.

Now, one thing is that we would love to see this label for all commands. If you're up to implementing it for all the missing commands it would really be awesome, I can offer help with the review, merging, and release process of Maestro.

This also has the benefit of making it easier to update the documentation: we can make a new page that describes the label and that it works for every command. I can also help with documentation after this PR is ready for merge.


Is there additional testing that could/should be done?

Your tests here are already great!

@Fishbowler
Copy link
Contributor Author

@igorsmotto What are your feelings on the commands that currently don't take parameters, like scroll or back? Make this the first?

@igorsmotto
Copy link
Contributor

@Fishbowler
I believe it makes sense. Since they will be optional.

The only thing to be aware of is that both APIs should work to avoid retro-compatibility issues, e.g.:

- scroll

and

- scroll:
    label: "custom label"

@Fishbowler
Copy link
Contributor Author

What about keeping support for undocumented (legacy?) formats like

- action: scroll

Currently, this is in my way.

@igorsmotto
Copy link
Contributor

Feel free to ignore those.

@Fishbowler Fishbowler force-pushed the FEAT-custom-labels branch 2 times, most recently from 6552b04 to 9ebb93e Compare September 5, 2023 16:45
@Fishbowler
Copy link
Contributor Author

@igorsmotto I think this is ready for re-review

Copy link
Contributor

@igorsmotto igorsmotto left a comment

Choose a reason for hiding this comment

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

That's awesome work! @Fishbowler 🎉

Made some small comments, but everything is looking good.

In the meantime, I'll run this PR against our internal test suite to be extra sure and if everything goes well, we'll be ready to merge it.

@Fishbowler
Copy link
Contributor Author

Accepted all, and tidied commit history (slightly) 👍

@Fishbowler
Copy link
Contributor Author

Added a draft PR of some docs to the docs repo.

PR: mobile-dev-inc/maestro-docs#25

Preview: https://github.com/Fishbowler/maestro-docs/blob/abe57ab66ab49c3c9361acaa130ec8ccc2290036/api-reference/labels.md

Copy link
Contributor

@igorsmotto igorsmotto left a comment

Choose a reason for hiding this comment

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

Hi there, @Fishbowler!

After our internal testing, we're thrilled to report that everything has passed with flying colors. Therefore, your PR has been given the green light, and we're planning to merge it ASAP.

I will take care of both this PR and the docs PR.

One important note is that this change will wait until the next release (1.33.0). The exact release date is still TBD, but your name will be in the Changelog when it finally arrives.

Your efforts have truly made a difference! We deeply appreciate it!

@igorsmotto igorsmotto mentioned this pull request Sep 12, 2023
@igorsmotto
Copy link
Contributor

Hey, @Fishbowler

Given that this is your user fork I don't have permission to edit this PR and resolve conflicts with the main branch

We have 3 options here:

  1. Give me permission with select Allow edits from maintainers. docs here so I can push the commit
  2. Have a PR building with this work with the resolution of conflict PR here. This will remove your author from the main branch history.
  3. Cherry-pick this commit and update this branch so I can merge right away

@Fishbowler
Copy link
Contributor Author

Weird, I've checked and I already had Allow edits from maintainers checked.

I've fast-forwarded my branch to yours, and got all the ✅s - good to go!

@igorsmotto igorsmotto merged commit a72aa57 into mobile-dev-inc:main Sep 12, 2023
amanjeetsingh150 added a commit that referenced this pull request Sep 19, 2023
amanjeetsingh150 added a commit that referenced this pull request Sep 19, 2023
@Fishbowler
Copy link
Contributor Author

Future archaeologists:
This was reverted after some internal problems in Maestro were discovered, then re-added by @amanjeetsingh150 in #1481

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants