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

#30 update Reablocks, fix focus on session change #37

Merged
merged 3 commits into from
Aug 13, 2024

Conversation

steppy452
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #30

What is the new behavior?

Textarea is now focused on any chance in session including new session being created.

Also, added a sample "working" story for the console

Screen.Recording.2024-08-12.at.8.55.29.PM.mov

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@steppy452 steppy452 requested a review from amcdnl August 13, 2024 01:57
Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for reachat-storybook ready!

Name Link
🔨 Latest commit 3e1f0d6
🔍 Latest deploy log https://app.netlify.com/sites/reachat-storybook/deploys/66bac5fa9ea812000881d17c
😎 Deploy Preview https://deploy-preview-37--reachat-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

useContext(ChatContext);
const [message, setMessage] = useState<string>('');
const inputRef = useRef<HTMLTextAreaElement | null>(null);

useEffect(() => {
if(inputRef && inputRef.current) {
Copy link
Member

Choose a reason for hiding this comment

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

inputRef is a ref so it will always be there - so i don't think you need the if(inputRef part.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will it? it could be null but i guess you could simplify with inputRef?.current

@@ -1093,3 +1093,106 @@ export const ImageFiles = () => {
</div>
);
};

export const Working = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Whats this story?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a "working" version - i made it to test the input stuff, but decided it might be useful to have something that functions even as state variables

Copy link
Member

Choose a reason for hiding this comment

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

ok i removed it from the main - we can add it back just needs a better name

@amcdnl amcdnl merged commit 5f4f414 into master Aug 13, 2024
5 checks passed
@amcdnl amcdnl deleted the syang/new-session-focus branch August 13, 2024 08:13
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.

2 participants