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

Default draft pulls toggle to off #397

Closed
erinemay opened this issue Nov 20, 2023 · 6 comments · Fixed by #399
Closed

Default draft pulls toggle to off #397

erinemay opened this issue Nov 20, 2023 · 6 comments · Fixed by #399
Assignees

Comments

@erinemay
Copy link

erinemay commented Nov 20, 2023

Pulldasher has the ability to show/hide draft pulls. Right now, it defaults to show.

  1. Set draft pulls default to off.
  2. Logged in user should see their own draft pulls even if draft is toggled off.

Context: This came up after a conversation about dev managers checking the dev_blocked column at a glance as well as going through the dev_blocked column to remind and poke at forgotten pulls. Drafts bloated the dev_blocked column, and turning drafts off every time was annoying.

@kwiens suggested auto-closing or auto-cryoing drafts after a certain amount of time.

@sterlinghirsh

I think having a Drafts section below the dev blocked pulls would be reasonably easy to implement and clarify that we don't actually have that many dev blocks.
I'd rather see them separate than hidden by default but I'm not going to die on that hill

@sctice-ifixit

I think drafts should be hidden by default, and we should basically ignore them. The point of a draft is to push something to get some feedback before it's done. They're usually shared directly with relevant parties, and if they end up sitting for a while it's likely harmless or will result in an issue also sitting around, which we're already monitoring

@erinemay
Copy link
Author

erinemay commented Nov 20, 2023

Actually, would it make more sense to set this with a cookie like we do with light/dark mode? That way a users preference persists.

JK we switched from cookies to local storage for light/dark mode.

@erinemay erinemay changed the title Set draft pulls toggle to default to off Default draft pulls toggle to off Nov 20, 2023
@kthaler kthaler self-assigned this Nov 21, 2023
@kthaler
Copy link
Contributor

kthaler commented Nov 27, 2023

After thinking it over, I messaged @danielbeardsley and he recommends using useBoolUrlState to preserve "drafts" in the URL instead of using cookies for user preferences. I agree since it'll stay consistent with the other attributes in the nav bar, but I'm still open to anything.

@erinemay
Copy link
Author

erinemay commented Dec 1, 2023

he recommends using useBoolUrlState to preserve "drafts" in the URL instead of using cookies for user preferences.

I wanted this to be something that persists, but after thinking about it, this is probably fine as a url param. Persisting the user preference over just defaulting to off with url params benefits those who want to always see all draft pulls. I don't know if anyone cares about enough about that state.

@danielbeardsley
Copy link
Member

I wanted this to be something that persists

The intent behind using url params is so you can bookmark your desired views. This also allows you to have multiple tabs open with different views.

@kthaler
Copy link
Contributor

kthaler commented Dec 5, 2023

I created a pull request: #399
Let me know if I should change anything.

@andyg0808
Copy link
Contributor

@erinemay Re. the rationale: I'm on-board with this now. That makes sense.

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 a pull request may close this issue.

4 participants