-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Disable Post button when empty #5953
Conversation
return | ||
} | ||
|
||
if (isAltTextRequiredAndMissing) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both removed conditions are a part of !canPost
now
|
172d464
to
b29f159
Compare
I think we should probably disable posting if there's an error in general? Empty or not. Clear/ack the error, then post. |
Pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
* origin/main: (213 commits) add Thai Language translation support (#5879) fix warning on labeler profile: emoji detected but emoji not enabled (#6011) Added blur to search's onPressMenu (#6017) React compiler beta and reenable rule (#5898) Sort imports (#6009) Clarify build instructions (#6008) Upgrade all tiptap deps to latest (#5232) width full on text container (#6007) Bump 1.94.0 (#6006) Add subtle web hover to interactive rows (#5989) Settings revamp (#5745) Show almost-instant preview when opening lightbox (#6000) Refactor lightbox model to plain object (#5999) temp revert to old modal (#6005) Extend composer checks to all posts in a thread (#5955) Remove indirection when rendering composer state (#5954) Refactor composer state for threads (#5945) Disable Post button when empty (#5953) fix splash screen (#5997) Fix video quality for short videos (#5996) ...
* Disable Post button when empty * Use regular disabled button * Disable post on video error until cleared
* Disable Post button when empty * Use regular disabled button * Disable post on video error until cleared
This in preparation for the threaded composer. It doesn't quite make sense to treat this as an error — we should just prevent you from posting, same as we do in other invalid cases (like too long post or missing ALT).
In the second commit, I'm also replacing ad-hoc grey disabled styling with our normal disabled button. We've already been using the disabled button for the case when you pressed post so let's use it here too.
Test Plan
Observe the initial state.
Verify that typing makes the button enabled.
Verify existing flows (adding image, filling alt, adding video, posting before it's uploaded) work like before.