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

feat: modal which shows in which form the question is used #2467

Merged
merged 4 commits into from
Dec 19, 2023

Conversation

StephanH90
Copy link
Contributor

Description

This MR introduces a new modal which shows in which form a question is being used (and if that form is archived or not published).

Button which opens the modal

image

(I'm not sure about the label)

Modal

image

@StephanH90
Copy link
Contributor Author

@anehx y u no review?

@czosel
Copy link
Contributor

czosel commented Dec 13, 2023

Minor UX idea: Instead of the button, we could display a link only if the question is used in more than one form:

This question is used in (n) other forms.

Or, if you prefer the button:

Forms with this question (n)

where n >= 2

@derrabauke
Copy link
Contributor

derrabauke commented Dec 18, 2023

Minor UX idea: Instead of the button, we could display a link only if the question is used in more than one form:

This question is used in (n) other forms.

Or, if you prefer the button:

Forms with this question (n)

where n >= 2

I like the idea. That's how it looks now and I think the link is less obtrusive than the button.

image

@derrabauke
Copy link
Contributor

  • active state UI:
    image

  • inactive (no refs) state UI:
    image

@czosel
Copy link
Contributor

czosel commented Dec 18, 2023

Im not sure if the inactive (no refs) state is worth it. The label would have to be „this question is not used in any other form“, since it is always used in at least one form (the one that’s currently open). And that label sounds a bit complicated and doesn’t add much value, does it?

@derrabauke
Copy link
Contributor

Im not sure if the inactive (no refs) state is worth it. [...] and doesn’t add much value, does it?

I'm also unsure, but I wanted to cover all the possible cases. 🤷

@derrabauke
Copy link
Contributor

The label would have to be „this question is not used in any other form“, since it is always used in at least one form (the one that’s currently open). And that label sounds a bit complicated and doesn’t add much value, does it?

To condense it to the main idea of the feature: We want to show a hint in case this question is used in any other form. And if so we want to show all the references in a modal. Right?

So the link should sound: "The question is used in n other form(s)." -> excluding the current form, since that's a given.
And the modal: "All references of this question" -> including the current form.

@derrabauke
Copy link
Contributor

Updated design:

  • link
    image

  • modal
    image

@derrabauke derrabauke force-pushed the feat/question-usage branch 2 times, most recently from 707e48d to b57c3e9 Compare December 18, 2023 19:30
@derrabauke
Copy link
Contributor

Don't ask why I've added another test... just saw the existing one to late. 🤷‍♂️

Anyways ... it's ready for re-review @czosel

@anehx anehx merged commit c321f08 into projectcaluma:main Dec 19, 2023
57 checks passed
@anehx
Copy link
Contributor

anehx commented Dec 19, 2023

🎉 This PR is included in version 12.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@anehx anehx added the released label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants