Export, Import, Remove, Duplicate and preview tactics #120
Merged
maxime.batista
merged 5 commits from home/tactic-management
into master
1 year ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'home/tactic-management'
Deleting a branch is permanent. It CANNOT be undone. Continue?
This pull request adds import/export features, and the ability to remove, duplicate and preview a tactic in the home page.
a1f8ae5017
to47d81bb665
1 year agoreturn mapIdentifiers(content, (id) => id + "-parent")
}
export function mapIdentifiers(
This seems to be quite a huge workaround when the primary issue is that the visualizer use
document
to get the DOM nodes by their id. Maybe update theBendableArrow
component to work only in itsarea
prop?if (typeof contentResult === "string") throw Error(contentResult)
Atomics.add(totalStepsCompleted, 0, 1)
onProgress((Atomics.load(totalStepsCompleted, 0) / treeSize) * 100)
No need to use atomics as everything happen on the same thread.
This work should really be done server side, as it creates a lot of requests and exchanges with the database. Also for the record, you could perform all requests at the same time, regardless of the depth of the node in the tree:
return { ...state!, tactics: [action.tactic, ...state.tactics] }
case HomePageStateActionKind.REMOVE_TACTIC:
return { ...state!, tactics: state.tactics.filter(t => t.id !== action.tacticId) }
handleChange={handleDrop}
types={["json"]}
hoverTitle="Déposez ici"
label="Séléctionnez ou déposez un fichier ici"></FileUploader>
export interface ExportTacticPopupProps {
service: TacticService
show: boolean
If the popup has been rendered, it is because it should be shown.
window.addEventListener("keyup", onKeyUp)
return () => window.removeEventListener("keyup", onKeyUp)
}, [onHide])
Place this code in a separate hook as it is used for all popups.
)
setExportPercentage(0)
}}>
<p className="export-card-title">Export in JSON</p>
const e = document.createElement("a")
e.setAttribute(
"href",
"data:application/octet-stream," +
align-items: center;
justify-content: center;
* {
While it's great to try new things, note that native CSS selector nesting has only been supported for less than a year (it's not available in the current Firefox ESR, for example).
}
#body-personal-space::-webkit-scrollbar {
display: none;
width: 50px;
height: 50px;
border-radius: 20%;
-webkit-user-drag: none;
0de42db300
into master 1 year agoReviewers
0de42db300
.