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

Refactor dialog processing #78

Merged
merged 11 commits into from
Oct 4, 2024
Merged

Conversation

KevinBatdorf
Copy link
Contributor

I couldn't reproduce the bug in #76 but I refactored the code and removed some of the unnecessary logic. I'm hoping this addresses it.

I merged in the two character/no character functions and named it displayDialogue. This makes it easier to manage the next/close buttons and the name can easily be checked before prepending it to the string. It also narrows the surface for bugs.

Some new rules I introduced:

  1. Refer to dialog (the box) and dialogue/text (the conversation)
  2. All text passed into dialog should be an array

Can you test it out? I can make changes tomorrow if needed (or in a follow up PR if its good enough to merge)

closes #76

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 109 190
📑 Files Changed: Repo Stars: 🔱 Total Forks:
10 20 43

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 111 192
📑 Files Changed: Repo Stars: 🔱 Total Forks:
10 20 43

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 115 192
📑 Files Changed: Repo Stars: 🔱 Total Forks:
11 20 43

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 115 192
📑 Files Changed: Repo Stars: 🔱 Total Forks:
11 20 43

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 200 255
📑 Files Changed: Repo Stars: 🔱 Total Forks:
15 20 43

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 201 255
📑 Files Changed: Repo Stars: 🔱 Total Forks:
15 20 43

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 263 256
📑 Files Changed: Repo Stars: 🔱 Total Forks:
15 20 43

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 296 259
📑 Files Changed: Repo Stars: 🔱 Total Forks:
15 20 43

@KevinBatdorf
Copy link
Contributor Author

I think this is ready to check now. Maybe the next refactor could merge the remaining two dialog functions, so you can pass the button label and callback for when it's clicked. I think it would make the code much more readable and less complex logic. I can do that over the weekend.

@r4pt0s
Copy link
Collaborator

r4pt0s commented Oct 4, 2024

@KevinBatdorf awesome. Good job.
Can you please resolve the remaining merge conflict 🙏🏻

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 296 261
📑 Files Changed: Repo Stars: 🔱 Total Forks:
15 20 46

Copy link

🙏 Thanks for your pull request @KevinBatdorf, The team will now review and merge this request. In the mean time why not check out some of the other opensource projects available, contributions are greatly appreciated!

Some of the most popular are


PR Statistics

#️⃣ PR Number: Line Additions: 🗑️ Line Deletions:
78 296 261
📑 Files Changed: Repo Stars: 🔱 Total Forks:
15 20 46

@KevinBatdorf
Copy link
Contributor Author

Can you please resolve the remaining merge conflict 🙏🏻

Done.

I think combining the options container would be a next step as well in a followup PR, and having one place for all dialogs.

@r4pt0s r4pt0s merged commit 9ca74f6 into zero-to-mastery:main Oct 4, 2024
1 check passed
@r4pt0s r4pt0s added hacktoberfest Hacktoberfest label for 2024 hacktoberfest-accepted labels Oct 4, 2024
@r4pt0s
Copy link
Collaborator

r4pt0s commented Oct 4, 2024

@KevinBatdorf that is a good idea.

@KevinBatdorf KevinBatdorf deleted the fix-bruno-text branch October 4, 2024 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Hacktoberfest label for 2024 hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: mobile trigger for conversations shows last conversation => unresponsive end
3 participants