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

Add ability to hide forms trash #690

Closed
matthew-white opened this issue Feb 8, 2023 · 8 comments · Fixed by getodk/central-frontend#1101
Closed

Add ability to hide forms trash #690

matthew-white opened this issue Feb 8, 2023 · 8 comments · Fixed by getodk/central-frontend#1101
Assignees
Labels
backend Requires a change to the API server behavior verified Behavior has been manually verified enhancement New feature or behavior frontend Requires a change to the UI

Comments

@matthew-white
Copy link
Member

@yanokwa brought up the idea of hiding the forms trash so that the page appears less messy. From Slack:

One solution could be adding a ▶️ so you can toggle it open and closed. Should probably default to closed since we can’t easily persist views?

I've filed #689 about saving user preferences. Whether the trash is shown or not could be one of those preferences.

@matthew-white matthew-white added the enhancement New feature or behavior label Feb 8, 2023
@matthew-white matthew-white transferred this issue from getodk/central-frontend Jul 18, 2024
@matthew-white matthew-white added backend Requires a change to the API server frontend Requires a change to the UI labels Jul 18, 2024
@github-project-automation github-project-automation bot moved this to 🕒 backlog in ODK Central Sep 18, 2024
@matthew-white matthew-white added the needs testing Needs manual testing label Sep 18, 2024
@matthew-white matthew-white moved this from 🕒 backlog to ✏️ in progress in ODK Central Sep 18, 2024
@matthew-white matthew-white added the needs design review Needs verification from designer label Oct 29, 2024
@github-project-automation github-project-automation bot moved this from ✏️ in progress to ✅ done in ODK Central Nov 5, 2024
@matthew-white
Copy link
Member Author

@getodk/testers, this issue is now ready to be verified. It is available on the staging server. There is a new button at the top of the form trash section to show or hide the trash. The trash is shown by default. The choice/preference to show or hide the trash is saved on the backend. For example, if you hide the trash, then you refresh the page or open the page in a new tab, you should see that the trash is still hidden. Hiding the trash in one project will not hide the trash in another project: the choice to hide the trash is limited to the individual project.

@matthew-white
Copy link
Member Author

matthew-white commented Nov 5, 2024

The choice/preference to show or hide the trash is also limited to the user. For example, if I hide the form trash in a project, then another user visits the same project, the other user should see that the trash is visible, not hidden.

@srujner
Copy link

srujner commented Nov 5, 2024

Tested with Success!

@matthew-white Is there a possibility to add something similar for the Archived Projects section?

@srujner srujner added behavior verified Behavior has been manually verified and removed needs testing Needs manual testing labels Nov 5, 2024
@matthew-white
Copy link
Member Author

Ah that's a good idea! I've added it to #719 so we don't lose track of it.

@issa-tseng
Copy link
Member

issa-tseng commented Nov 15, 2024

Image

it works but what's going on here?

should only have one caret of course, and if we're using the red caret it needs to be quite a bit smaller and spaced out a bit from the trash icon.

@brontolosone
Copy link
Contributor

Hmmmm I've not seen that other caret before (the black one), on Firefox nor on Chromium. Are you on Safari?

@issa-tseng
Copy link
Member

ah, yeah. a little -webkit-appearance: none usually sorts that out.

@matthew-white
Copy link
Member Author

I'm not sure that @brontolosone has easy access to Safari, but I took a quick look at this. Just to say it explicitly, this is a <details> element. I tried adding -webkit-appearance: none to both the <details> and the <summary> within the <details>, but it didn't have an effect.

This article on MDN suggests list-style: none. However, that also didn't have an effect.

This other article on MDN suggests using a pseudo-element:

::-webkit-details-marker { display: none; }

I tried that out, and it worked. 🎉

In general, we're not targeting Safari these days, but I think it makes sense to make this small fix, since it's easy to do.

@brontolosone, would you mind adding that to your PR when you make the other changes?

#form-trash-list summary::-webkit-details-marker { display: none; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Requires a change to the API server behavior verified Behavior has been manually verified enhancement New feature or behavior frontend Requires a change to the UI
Projects
Status: ✅ done
Development

Successfully merging a pull request may close this issue.

4 participants