Comments (11)
@joshwcomeau No problem!
I'll surely help out as much as I can. Will keep you updated.
from guppy.
Can I help out with this?
from guppy.
Can I help out with this?
@V1shvesh that'd be awesome!
Let me know if you have any questions along the way; I don't expect any huge complications, but this is a hot code path and it's used all over the project, so it's non-trivial.
Going to remove the "help wanted" issue, this'll be yours to tackle. No worries if you've changed your mind or don't have the time, though; just please let me know and I'll re-open it for others.
from guppy.
@V1shvesh how's this going? Not urgent at all, just checking in to see if you have any questions, or if I can do anything to help :)
from guppy.
@joshwcomeau Hey there!
Well, I didn't know much about Redux and reducers, so I kinda went learning through the docs. I am trying to understand it myself.
I'll surely clear any doubts with you, would love your help.
Hope to fix this in 2-3 days.:relaxed:
from guppy.
const buildUniqueTaskId = (projectId, name) => `${projectId}-${name}`;
I believe this isn't needed anymore?
from guppy.
Well, I didn't know much about Redux and reducers, so I kinda went learning through the docs. I am trying to understand it myself.
Ahh I understand. Ok! Very brave of you to try and tackle such a big refactor without prior redux knowledge, haha. Will be glad to answer any questions, although it may take me a while to respond, busy these days working to get a talk prepared.
Hope to fix this in 2-3 days.
βΊοΈ
No rush :)
const buildUniqueTaskId = (projectId, name) =>
${projectId}-${name}
;
I believe this isn't needed anymore?
Right. I'm pretty sure you won't need that anymore. The thing to check is where those unique IDs are used, and to see if a non-unique Id (like the task name, eg. start
) will be sufficient. I believe it will be, but I'm not sure off the top of my head.
from guppy.
busy these days working to get a talk prepared.
This sounds cool!
Also,
type State = {
[projectId: string]: {
[taskName: string]: Task,
},
};
This'll be the structure of state, I suppose.
from guppy.
@V1shvesh yeah, that's right! The Task
type will likely need to change a bit as well, to remove id
.
from guppy.
Hey @joshwcomeau
Please check my PR and let me know if I went wrong anywhere.
Apart from that, in redux-persistence.service.js,
const scrubbedTasks = Object.keys(reconstructedState.tasks).reduce(
(acc, taskId) => {
const task = { ...reconstructedState.tasks[taskId] };
task.status = 'idle';
task.processId = null;
task.logs = [];
return { ...acc, [taskId]: task };
},
{}
);
Do we want to have a nested structure in scrubbedTasks
?
from guppy.
Yay, thanks @V1shvesh! Checking now.
For redux-persistence
, it should match the same structure (since this structure will be used for the initial state on next load). So yeah it should be nested as well. Which does make this operation a bit trickier... hopefully not too bad though!
from guppy.
Related Issues (20)
- Export to Codesandbox
- Batch start multiple tasks
- Change test script to interactive mode HOT 2
- react-scripts not found HOT 4
- package.json gets wiped and committed sometimes (inconsistent)
- Improve reinstall loading screen status message UI HOT 4
- can't finde local nodejs HOT 2
- Test killProcessId after bumping ps-tree HOT 1
- Improve UX by cancelling blocking tasks or paralleling tasks
- Disable actions that require an internet connection HOT 8
- Node Missing HOT 1
- Confirmation prompt upon exit if the servers are still in running state. HOT 6
- Theming of the UI HOT 4
- Color normalization
- Sidebar reorder blocked by component overlay HOT 9
- Tab-nabbing vulnerability on the guppy5.02.09 CMS HOT 1
- Mark or highlight an outdated dependency HOT 1
- Why only create-react-app or Gatsby projects?
- Templates options
- Is this project dead?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guppy.