-
Notifications
You must be signed in to change notification settings - Fork 3
Add support for leaving comments in reflections #46
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
base: main
Are you sure you want to change the base?
Conversation
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.
Great work so far on this! 🌟
Really good how you solved encoding of the variable length strings, and implemented the core functionality.
Apart from some minor comments to resolve, the next step is to align the styling with the other input fields. One source of inspiration might be to look at the other input fields and copy the same classes to get matching borders, colours, backgrounds, paddings and similar.
{#if currentReflection.comment != null && currentReflection.comment.length > 0} | ||
<CommentView textData={currentReflection.comment} /> | ||
{:else} | ||
<CommentView textData="." hidden /> |
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.
This is a bit of a hacky solution to get a non-empty string to appear in the component so it gets the same height as reflections with comments. I've set the visibility to hidden so that when scrolling between reflections the page layout remains consistent. This solution can surely be improved though.
This commit also prevents arrow key navigation between pages when editing a comment
527246c
to
606f975
Compare
This PR adds support for leaving a comment in each reflection.
A new serialization version has been created to handle storing the additional string data, v3, which is largely a copy of v2. Small modifications were made to encodeEntryData.
The remaining work is primarily improving the styling of the comment field, on both the input / output pages.