Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
chore: add floating button page component #17737
chore: add floating button page component #17737
Changes from all commits
fa4cb46
a531cf1
dc4fa94
58323ac
da09c54
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Nice work on setting up everything outside the renderer!
@J-Son89, @ulisesmac I think here we can learn from React hooks how to decouple views from stateful concepts, even if we're just using Reagent. The idea is simple, we extract to a function meaningful bundles of code and return a map of values/functions that operate as an interface of sorts that hides the inner complexities of the stateful code. I think this technique can be used much much more in our repo.
I suggest the following diff, which I very much enjoyed writing :) I wanted to see if it would be an improvement and if it actually works.
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.
nice suggestion! :)
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.
Thanks @ilmotta it sounds good 👍
the reading of this component is hard, it has been definitely improved 👍
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.
partial
is your friend here.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.
Following up on @smohamedjavid suggestion, we don't need an anonymous function.
So just
#(swap! content-height + 10)
is enough. Same idea for the on-press that subtracts 10 a few lines below.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.
I'm sure we're trying to follow the naming scheme from quo preview, but it's more idiomatic to name the "main" namespace as
core
.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.
We won't need a flat list for the screens of this type?
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.
as far as I know that's not the case, we can check if it's as simple as replacing this scroll-view here but if it starts adding complexity then it will be easier to add a separate component using many of the same sub components/approach as here.