Skip to content

Conversation

@anna-parker
Copy link
Contributor

@anna-parker anna-parker commented Dec 5, 2025

resolves #5637

Screenshot

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

🚀 Preview: Add preview label to enable

@anna-parker anna-parker added the preview Triggers a deployment to argocd label Dec 5, 2025
@anna-parker anna-parker changed the title refactor(website): edit page - remove side effect from refactor(website): edit page - remove side effect from rows getter Dec 5, 2025
fastaHeader: null,
value: null,
initialValue: null,
key: EditableSequences.getNextKey(),
Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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?

@anna-parker anna-parker marked this pull request as ready for review December 5, 2025 09:00
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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(),
Copy link
Contributor

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?

Base automatically changed from edit-page-anya to main December 5, 2025 13:44
@anna-parker anna-parker linked an issue Dec 5, 2025 that may be closed by this pull request
@anna-parker anna-parker force-pushed the remove_side_effect branch 2 times, most recently from 303114e to b2d3a96 Compare December 5, 2025 16:33
@anna-parker anna-parker removed the preview Triggers a deployment to argocd label Dec 10, 2025
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.

Codesmell: edit page function has side effect

3 participants