-
Notifications
You must be signed in to change notification settings - Fork 5
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
current update is saved when new log is created #88
Conversation
When a user creates a log without saving and then tries to create a new log, the first log will be cleared. This update fixes that issue by bringing back the stored values in updates. If a user cancels their update the changes will not be committed.
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.
Mostly looks good, but there are a couple of places we need to be checking/storing error states so we don't create a validation loop hole.
: changeLog.createdDate, | ||
'date', | ||
), | ||
er: false, |
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.
should we be doing a check against changeLog.state?.updates?.createdDateTmp?.date?.er
? It's edge case, but if a user exits editing while they have an error in the date we wouldn't want to erase that when they return - the validation logic only runs onTextEditEnd
for the input.
^ This would apply to both date and time error values
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.
input fields have been refactored to include optional error messaging. The date and time fields are fully being tracked for errors etc for users and are kept in place if they navigate to another log and come back.
key: changeLog.state?.updates?.link?.key ? changeLog.state?.updates?.link?.key : '', | ||
}, | ||
type: changeLog.state?.updates?.type ? changeLog.state?.updates?.type : changeLog.type, | ||
change: changeLog.state?.updates?.change ? changeLog.state?.updates?.change : changeLog.change, | ||
linkFormError: { label: false, url: false }, |
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.
similar to my other comment, I think we should be checking for error values here as well.
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.
input fields have been refactored to include optional error messaging. The link fields are fully being tracked for errors etc for users and are kept in place if they navigate to another log and come back.
Added a new value for GAP, this required an adjustment of the other GAP values to accommodate for the new GAP.lg value. The number values should be the same, the reference is just updated.
Added a new value for GAP, this required an adjustment of the other GAP values to accommodate for the new GAP.lg value. The number values should be the same, the reference is just updated. The vertical padding has also been removed. The new GAP.lg value makes this padding not needed.
Added a new value for GAP, this required an adjustment of the other GAP values to accommodate for the new GAP.lg value. The number values should be the same, the reference is just updated. The vertical padding has also been removed for last row. The new GAP.lg value makes this last row padding not needed. The radius tweak rounds the corners when avatars are hidden and squares off the top when shown to make it flush with the circle.
padding adjustments and new error messaging. The date error text was breaking out of the widget bounds when avatars and log types are off. All errors messages have been condensed in this consistent format.
- padding and spacing adjustments to take advantage of new GAP.lg option - updated error handling for links. When there is an error for label or URL the save change button will now toggle to error state consistent with date and time errors. - handling of dates and times (both error and valid) if a user switches to another log before saving. - bug fix when user enters update text and then removes it the previous text reappears. This no longer happens and users can add, remove etc without issue and this field is the only optional field. - added autolayout names as needed
very small adjustment to make dividers have rounded corners. All dividers, lines, and dashed lines should be rounded. The only place dashes are not rounded is the log type button. This will require a bit of refactor that isn't as easy to just get in line like the rest. I switched out the Rectangle for a Line because of how the dashes work.
changes the border for the left side to the darker grey when the row is actively focused and being edited. Provides a bit of a focus state when there are many rows. Also updated corner radius for the divider to make style guide.
The way in which errors are presented to the user was refactored and this function is not needed. Padding token was adjusted in a previous commit and is being removed here.
👆 Error in our tests Updated the typings file as suggested here --> https://www.figma.com/plugin-docs/api/typings/ Did the same for widget typings.
switching out tokens cleaning up tokens removing inline formulas using tokens fixing change type list key bug
refactored all log input fields into a new component
date and time fields main log update field link label and URL fields
is there a reason we are limiting the number of links to 8?
Quite a few updates to finish out this PR. Four sets of changes:
|
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.
Changes look good!
Description
When a user creates a log without saving and then tries to create a new log, the first log will be cleared. This update fixes that issue by bringing back the stored values in updates. If a user cancels their update the changes will not be committed.
Fixes # (issue)
Type of Change
How Has This Been Tested?
Tested locally in Figma.