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

Fixing copy suggested title when creating posts. #2517

Closed
wants to merge 1 commit into from

Conversation

dessalines
Copy link
Member

I have no idea why, but these onBlur events broke the onClick for copy suggested title.

What are they doing exactly?

Copy link
Member

@SleeplessOne1917 SleeplessOne1917 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The onBlurs set the url query params when the user clicks outside of the inputs or if the inputs use focus. The alternative is updating them every time they are changed (basically every time the user adds or removes a character while typing in the field), which seems overkill.

Removing all of these will break the create post query param regression fix I did last night. I'll take a look at this now.

@dessalines
Copy link
Member Author

Sweet, thx.

@matc-pub
Copy link
Collaborator

matc-pub commented Jun 7, 2024

@SleeplessOne1917 I think the problem is that the state is lost every time the url updates. CreatePost doesn't have a mountedSameRouteNavKey in src/shared/routes.ts.

@dessalines
Copy link
Member Author

I've removed the lemmy-ui 0.19.4 tag until we get that one fixed, last hour bug.

If you can't figure this out, is removing these onBlurs breaking anything? Or is it just wasteful.

@SleeplessOne1917
Copy link
Member

I figured out the problem. I'm gonna clean things up a bit and open a PR.

@dessalines
Copy link
Member Author

Cool, I'll close this one then.

@dessalines dessalines closed this Jun 7, 2024
@SleeplessOne1917 SleeplessOne1917 deleted the fix_copy_suggested_title branch June 7, 2024 16:23
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 this pull request may close these issues.

3 participants