Add Attributes from the GUI#734
Open
AndreQuimper wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One sentence summary of this PR (This should go in the CHANGELOG!)
Added
add_attributeandget_all_resource_attributesendpoints toserver.pyand Button/View to GUI to allow adding ResourceAttribtues manually from GUI, supporting certain workflows like flash unpacking (#573)Link to Related Issue(s)
#573
Please describe the changes in your request.
Added a button to the AttributesView that displays a view that allows users to manually add ResourceAttributes through the GUI. There is a dropdown menu that lists all resource attributes for ease of selection (with hotkeys for search). Nested attributes can be added through a JSON text input. AttributesView updates automatically after new attributes are added.
Much of the code is largely based on that for the Add Tag functionality, including code in
remote_resource.jsandAddAttributesView.svelte(mirrorsAddTagView.svelte)Besides unit tests, for manual testing using
flash_test_plain.bindo:{ "data_block_format": [ ["ofrak.core.flash.FlashField", {"field_type": "ofrak.core.flash.FlashFieldType.DATA", "size": 223}], ["ofrak.core.flash.FlashField", {"field_type": "ofrak.core.flash.FlashFieldType.ECC", "size": 32}] ], "ecc_attributes": ["ofrak.core.flash.FlashEccAttributes", {"ecc_class": ["ofrak.core.ecc.reedsolomon.ReedSolomon", {"nsym": 32}]} ] }Anyone you think should look at this, specifically?
@whyitfor