Skip to content
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

feat(2.5): Batch Flash Nodes #8

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

barrenechea
Copy link
Contributor

@barrenechea barrenechea commented May 23, 2024

Opening as a draft to add visibility on changes & things to do.

This PR adds the feature discussed in turing-machines/BMC-Firmware#201. It evaluates the users' board revision to render the Flash Node tab in either "Single mode" or "Batch mode". I've replaced the Select input with Toggle buttons 😄

From the end-user perspective, it could choose a single node (as it currently works for v2.4 boards), but now, for >=2.5, the UI will allow it to select more than one node.

TODO list:

  • Add a skeleton to the Flash Node tab Done 🚀
    Previously, this view didn't require any data from the server to render, so it did not require a skeleton. Now it requires the board_revision field, and so as a good practice, it should have a skeleton available to render in-between the network call and the final render.
  • bmcd to implement the &batch=1,2,3 logic required for >=v2.5 boards and validate expected behavior.
GIFs!

Rendered view for v2.4 users:
tpi2 4

Rendered view for v2.5 users (view wording also changes into plural):
tpi2 5

Bumping minor to v3.4.0 following SemVer.

function Flash() {
const { data: aboutData } = useAboutTabData();
const batchFlashingSupport = useMemo(
() => isSemverGreaterOrEqual(aboutData.board_revision, "2.5"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I'm assuming the new hardware feature is incremental (e.g., the Turing 2.6, 2,7, and so on will also have batch flashing). It's not something to worry about right now, but if that's not the case in the future, it may need revision.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right

@barrenechea barrenechea changed the title [v2.5] Batch Flash Nodes feat(2.5): Batch Flash Nodes Jul 18, 2024
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.

2 participants