-
Notifications
You must be signed in to change notification settings - Fork 9
refactor(website): edit page - remove side effect from rows getter #5639
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
| fastaHeader: null, | ||
| value: null, | ||
| initialValue: null, | ||
| key: EditableSequences.getNextKey(), |
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.
having getNextKey in the getter meant react was increasing the current key every time the getter was called
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.
Why does that actually matter? AFAICS we don't show those keys anywhere, do we?
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 dont but I think its good to ensure react code doesnt have unexpected side effects if we end up changing this code in future. I also hope splitting out the modification from the getter makes the EditableSequences class a bit more understandable
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.
Then this is a purely internal detail - I don't think we should worry about that too much...
If you think this makes it easier for you to understand, we can go ahead with this. I find the current version simpler.
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.
@corneliusroemer what is your impression does this make the code easier to read?
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| fastaHeader: null, | ||
| value: null, | ||
| initialValue: null, | ||
| key: EditableSequences.getNextKey(), |
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.
Why does that actually matter? AFAICS we don't show those keys anywhere, do we?
303114e to
b2d3a96
Compare
b2d3a96 to
519148b
Compare
resolves #5637
Screenshot
PR Checklist
🚀 Preview: Add
previewlabel to enable