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

Feature/persist toolbar display #140

Merged

Conversation

r-jarvis
Copy link

@r-jarvis r-jarvis commented Feb 9, 2024

Issue: #115

Added in configuration to RichTextKeyboardToolbar that allows a user to choose if they would like to always display the toolbar. Defaults to false and config in initializer defaults to .standard if no config is defined in init.

One thought I had while doing this. Would you like me to split out RichTextKeyboardToolbarConfiguration and RichTextKeyboardToolbarStyle into their own files? It feels a little off for them to be living inside of the main RichTextKeyboardToolbar file especially if more options/features are added in the future.

@DominikBucher12 DominikBucher12 self-requested a review February 13, 2024 13:03
Copy link
Collaborator

@DominikBucher12 DominikBucher12 left a comment

Choose a reason for hiding this comment

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

For me, this looks great. Thanks for this, I will just wait for @danielsaidi to confirm this. Thanks for this! :)

@danielsaidi
Copy link
Owner

This looks great @r-jarvis 🎉

Merging it now and will aim to release a new version soon.

I have also investigated using environment keys for styles and configurations, instead of injecting them into the initializer. This would allow us to apply e.g. .richTextToolbarStyle(...) anywhere within a view hierarchy.

This can help simplify styling e.g. toolbars, side panels etc. since we can inject these values into the view hierarchy instead of having to pass them down into the view that can inject them into the initializer.

If you think this makes sense, I think we should aim to introduce this pattern when going to 1.0.

@danielsaidi danielsaidi merged commit 2de9954 into danielsaidi:main Feb 13, 2024
1 check passed
@r-jarvis
Copy link
Author

@danielsaidi Yeah I really like the idea of that architecture pattern. I'll shoot to create a new PR that introduces it to the style/configuration for RichTextKeyboardToolbar.

@danielsaidi
Copy link
Owner

Sounds great! :)

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