poi
poi copied to clipboard
Add config option to use grid for global layout
This PR adds a configuration that turns the entire app into a giant grid that allows moving and resizing components to use the full screen
Configuration button:
Customizable layout:
Update: Had a really busy week and didn't make much progress. (Also need to grind the fish event). Will pick up next week on reworking the config layout. I think the grid layout should be with window/overlay layout buttons instead of the tab area buttons. gonna correct that and then move onto testing the canvas wrapper
The main problem should be the webview area should has a fixed ratio and can be set to use both a fixed value or controlled by window size
The main problem should be the webview area should has a fixed ratio and can be set to use both a fixed value or controlled by window size
I am thinking we can lock the webview area size to be not adjustable within the grid to simplify the logic, basicly only allowing user to move the webview area around but not allowing resizing it. Need to explore whether this is possible though (I don't know the code base or react well enough to make recommendations.)
@KochiyaOcean Hi, after I updated the branch with the latest the display settings are gone. Any idea why this would happen? Looking at my code changes I don't think it's from me..
rebased to 10.9.2 it works as expected:
I tried to wrap the main components as grid item in the poi-app.es but couldn't quite iterate because the whole app breaks. I think the underlying component (KanGameWrapper I think) is expecting something from its parent? I will keep trying but would really appreciate some inputs here
@liu-ziyang Try to update to the latest electron version, I think there is a related patch.
Update: I haven't give up yet! 😄
Right now I am learning react and nextjs on my spare time, hoping it would help me understand how javascript works better so I eventually understand what I need to do here, so it is going to take some time for me to come back to this PR.
I should be able to spend some time around end of December and dive a bit deeper on what is needed here
Made some progress on the grid, but at the same time the game size impacted the grid layout numbers, will think about how to handle this next
Still exploring the layout, I think what I may end up doing is dropping the overview panel in the grid mode and move everything to the grid while allowing toggling between settings and fleet panel. Any suggestions welcomed
@KochiyaOcean are you free to do a quick call any time you are available? I am kinda stuck trying to figure out how to wrap the settings panel in the grid. Would really appreciate if you have any tips on how the element boundary/sizing works
@liu-ziyang maybe you need to show your code changes
I changed how the HTML tags wrapped and made some progress by keeping the hierarchy of poi-main and poiApp, there must be some bundling somewhere I can't find that relies on this particular arrangement.
<ResponsiveReactGridLayout>
<div><div> // other items
<div>
<poi-main>
<PoiApp />
</poi-main>
</div>
<ResponsiveReactGridLayout>
^ seems to be working
That said, the event connection may still be having some issue as I am seeing empty fleet and setting information, I will keep digging but any tips appreciated. (also I have not been able to bring up the devtools for a while, I am not sure why or what I did that broke it)
Addicted to palworld and didn't have a chance to make much progress recently.
if anyone is interested feel free to take over, otherwise I will likely revisit the event bundling issue sometime in Feb after my work settles down a bit
Sorry for the inactivity here, was busy with interviews and job change...
I managed to isolate the event issue, the error seem to suggest the plugins are blocking the interface from working:
create-store.es:85 Warning: You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.
at input
at label
at /Users/ziyang/Projects/poi/node_modules/@blueprintjs/core/lib/cjs/components/forms/controls.js:30:32
at Blueprint5.Radio
at div
at I (/Users/ziyang/Projects/poi/node_modules/styled-components/dist/styled-components.cjs.js:1:22844)
at RadioCheck (/Users/ziyang/Library/Application Support/poi/plugins/node_modules/poi-plugin-prophet/src/views/settings-class/radio-check.js:46:5)
Not sure what exactly is this error message complaining about. I am assuming my change broke some assumptions the plugins are making?
@KochiyaOcean I think I have the rusty prototype ready for preliminary review and maybe trying out.
Some of the major area to work on next I think is:
- polish the code in the app.es, right now they are mostly copied over without much consideration
- testing switching between display modes
- default to ships view when on grid mode, even better if we can hide the main panel
- fine tuning UI looks, the configurations and setup is very silly and hardcoded, I don't quite know how can I make it more automatic via css etc
- cross OS support (not sure what I break in the process of changing code)
since the early spring event is upcoming, likely I will be away doing that before coming back again, hopefully I can finish polishing up before end of March if the event is not too hard