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

[UI idea] Tags dropdown #4759

Merged
merged 9 commits into from
Nov 27, 2023
Merged

[UI idea] Tags dropdown #4759

merged 9 commits into from
Nov 27, 2023

Conversation

hasan-sh
Copy link
Collaborator

@hasan-sh hasan-sh commented Nov 16, 2023

Fixes #4744
Structure

  • currently, the dropdown displays all tags that:
    • if used by adventures, at least one adventure must be public,
      • This ensures that if a teacher uses a tag in private adventures only, this tag won't be visible to other teachers.
    • are not used by any adventure
      • (what tag would that be? e.g., a tag is created but then untagged from all adventures that used it)

How to test?

  • got to /customize-adventure/[id] view
  • try adding/removing tags

Archive

  • the choices we had:
    • get a tag iff all adventures that use it are public
    • get a tag iff one or more adventures that use it are public

    what would happen if a tag isn't used by any adventure?

    • hence the choice!
    • any other thoughts are welcome.

@hasan-sh hasan-sh marked this pull request as draft November 16, 2023 13:30
@ghost
Copy link

ghost commented Nov 16, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@hasan-sh hasan-sh marked this pull request as ready for review November 20, 2023 15:58
@Felienne
Copy link
Member

the choices we had:

  • get a tag iff all adventures that use it are public
  • get a tag iff one or more adventures that use it are public

what would happen if a tag isn't used by any adventure?

  • hence the choice!
  • any other thoughts are welcome.

Thanks for explaining your considerations @hasan-sh! It is a bit hard to see what choice you did pick, can you elaborate a bit? I think I would lean to showing all tags iff one or more adventures that use it are public, and if you select a tag that does not exist for your level/language, simply show: "no adventures found"?

@Felienne
Copy link
Member

I don't think I know how to test this, I don't seem to be able to get to the search page from the UI in this branch:

image

@hasan-sh
Copy link
Collaborator Author

It is a bit hard to see what choice you did pick, can you elaborate a bit? I think I would lean to showing all tags iff one or more adventures that use it are public,

Currently, i show all tags regardless of the adventures that use them. I'll edit it to show tags that have at least one adventure public.

Also, if a tag isn't used by any adventure, I'll consider it as a public tag; so that it can be reused!

@Felienne
Copy link
Member

Ah got it now, this is about showing tags for existing adventures! (Somehow I thought we were talking about searching with tags)

Looks good!

image

@Felienne
Copy link
Member

Currently, i show all tags regardless of the adventures that use them.

Now that I understand what we are doing, I think this is actually fine. I don't see a reason to not show all tags!

@Felienne
Copy link
Member

Before we go on to merge this, can you change the body of the PR to describe what it does (rather than the considerations)?

@Felienne Felienne requested a review from jpelay November 21, 2023 09:12
@Felienne
Copy link
Member

Looks good to me in terms of functionality and UX, would love to have @jpelay's input on the code and then we are good to go

- those with at least one public adventure
- those that aren't used in any adventure
@jpelay
Copy link
Member

jpelay commented Nov 21, 2023

I think the UI looks pretty sleek! However, I'd like if for the dropdown you did the same as when you've already added the tags, because when there are many tags it overflows:

image

@jpelay
Copy link
Member

jpelay commented Nov 23, 2023

The dropdown looks perfect now! Great work, Hasan!
image

I have a question about functionality: what happens after there are dozens, or even hundreds of public tags created. All of those will be shown in the dropdown?

@hasan-sh
Copy link
Collaborator Author

The dropdown looks perfect now! Great work, Hasan! image

I have a question about functionality: what happens after there are dozens, or even hundreds of public tags created. All of those will be shown in the dropdown?

Good point and that's correct, all public tags are listed. We could probably add a limit later on! I think it's good to have this published asap, so that teachers begin tagging adventures!

@Felienne
Copy link
Member

Good point and that's correct, all public tags are listed. We could probably add a limit later on! I think it's good to have this published asap, so that teachers begin tagging adventures!

Yes! About that, I added this to the newsletter board so @SabinaChita has it on her radar to explain to teachers.

@jpelay
Copy link
Member

jpelay commented Nov 27, 2023

Good point and that's correct, all public tags are listed. We could probably add a limit later on! I think it's good to have this published asap, so that teachers begin tagging adventures!

Awesome, and thanks for the reply! Do you think we need to open an issue so we don't forget? I just approved so it will go to Alpha soon 😄

Copy link
Contributor

mergify bot commented Nov 27, 2023

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit da5a6cb into main Nov 27, 2023
11 checks passed
@mergify mergify bot deleted the tags-dropdown branch November 27, 2023 16:17
@Felienne
Copy link
Member

Good point and that's correct, all public tags are listed. We could probably add a limit later on! I think it's good to have this published asap, so that teachers begin tagging adventures!

Awesome, and thanks for the reply! Do you think we need to open an issue so we don't forget? I just approved so it will go to Alpha soon 😄

Yes, let's do that! And I guess we also still need a table on beta?

@jpelay
Copy link
Member

jpelay commented Nov 27, 2023

Yes, let's do that! And I guess we also still need a table on beta?

I think so, I created it only for Alpha. What is beta? I think I've never accessed it.

@Felienne
Copy link
Member

Yes, let's do that! And I guess we also still need a table on beta?

I think so, I created it only for Alpha. What is beta? I think I've never accessed it.

yeah sorry for the confusion! beta = production (but all the tables on AWS are called either alpha for alpha or beta for prod) I will duplicate the table to beta/production.

@jpelay
Copy link
Member

jpelay commented Nov 27, 2023

yeah sorry for the confusion! beta = production (but all the tables on AWS are called either alpha for alpha or beta for prod) I will duplicate the table to beta/production.

Ohhhhhh that makes sense, thanks. I thought it was some deprecated environment 😅

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

Successfully merging this pull request may close these issues.

[UI idea] add dropdown to show existing tags
3 participants