shpaass / yafc-ce

Powerful Factorio calculator/analyser that works with mods
GNU General Public License v3.0
40 stars 15 forks source link

Legacy production sheet with empty group crashes on saving #159

Open Dorus opened 1 month ago

Dorus commented 1 month ago

Create a new project

Create a new group (folder icon)

Save

Error:

afbeelding

veger commented 1 month ago

I think we should remove the Legacy Production Sheet I guess

shpaass commented 1 month ago

I'll check with the community if anyone uses it.

shpaass commented 1 month ago

Based on the community responce, it seems like no one uses it, so you can go ahead and remove the Legacy Production Sheet.

shpaass commented 1 month ago

Update: there is one person using it.

XhenZui commented 1 month ago

Hi, I am the one person, it would be nice if the legacy production sheets could stay in. As currently, the new summary doesn't really offer the capability to show me the sum total of resources of a lot of pages. Also, the new summary UI breaks once you have only a few items in it, you would need to scroll to the side, but you can not (see attached screenshot). grafik

Another bug in the current version (0.7.1) is that you can not open a project with summary pages. grafik grafik

(the error message is kind of weird, since the paths shown in the error don't exist on my machine)

I can also show how I use the legacy summary to show how useful it is if required.

edit: i was able to open my project in version 7.0.0

veger commented 1 month ago

I am the one person

Hi welcome :wave:

As currently, the new summary doesn't really offer the capability to show me the sum total of resources of a lot of pages.

I never used the legacy summary, as it was/is never finished. What is interesting about the total sum of resources? If there is a use case that one of the volunteering developers sees the value for, it might be implemented in another place, so such a feature would not be lost (no promises though).

you would need to scroll to the side, but you can not

This is a known issue: #60, I started to fix this as it annoys me too (#161), but the 'scrollbar code' is rather convoluted so it is not yet (properly) fixed. As a workaround you can use CTRL+ for horizontal scrolling.

Another bug in the current version (0.7.1) is that you can not open a project with summary pages.

With my (test) projects it works, if possible could you file a separate bug report with the project file and a list of mods you use (or if possible the zipped mods folder). Then we can check what is going on and hopefully solve your issue.

the error message is kind of weird, since the paths shown in the error don't exist on my machine

These are the paths on the machine of @have-fun-was-taken as they make the releases. Good to mention as we should strip those paths! I opened #164 to fix this.

I can also show how I use the legacy summary to show how useful it is if required

Yes please, as we do not want to throw away useful features, I think we just don't understand what the Legacy Summary has to offer!

XhenZui commented 4 weeks ago
Another bug in the current version (0.7.1) is that you can not open a project with summary pages.

With my (test) projects it works, if possible could you file a separate bug report with the project file and a list of mods you use (or if possible the zipped mods folder). Then we can check what is going on and hopefully solve your issue.

i noticed that i have some summary pages i cant delete maybe it has something to do with that? But i will create a new Issue for this.

I can also show how I use the legacy summary to show how useful it is if required

Yes please, as we do not want to throw away useful features, I think we just don't understand what the Legacy Summary has to offer!

So first up, i play pyanodons with LTN. I have one YAFC Production sheet for every block of my factory, these are named by the product and also have a prefix. The prefix tells me if this block is actually built or if i was just planning something, this is required so i know which pages i need to add to the summary page.

Now i create a legacy Production summary page this goes quite quick as i simply filter the pages i want to add by the prefix, all i need to do then is click all the pages in the drop down (see next picture). Adding all the pages to a summary takes only like a minute as i just need to click through the list (it doesnt close when you add a page) grafik

Now when i encounter a shortage of a product ingame, i check the summary page if there should be a shortage ingame or if there is some other issue that leads to reduced production. In yafc i simply open the summary page and check in the bottom material overview if im underproducing, see picture.

For example i had a shortage of copper plate, now i check the copper plate and see that its like -1/km grafik

Now if i am actually under producing and its not just that some production got stuck in game. I can quickly check which part of my factory consume/produce the product. I do this by simply clicking the item in the bottom overview of the summary page. Here i clicked on the copper plate symbol in the bottom overview and now i can see all the pages that use copper - see next picture (note you need to deselect in the bottom overview if you want a column to go away, if you want to see all pages simply click on electricity as every page has electricity) grafik With this information, i check whether i should reduce consumption (by using alternative recipes) or if i should increase production. Now for maintaining the legacy summary page - due to legacy page being quite buggy - i usually recreate the page quite often as it showed to be quicker than actually maintaining an existing page (this takes me maybe 1 - 2 minutes).

As an comparison to what i just did with the copper plates i tried to do the same with the new summary and for this i had to open all the pages that have copper as in or output - see next picture. (this has become actually doable with the improved search, that feature is great). The issue outside of the visuals is that the - as far as i can tell - does not show how much copper I'm missing. Also having to open all the pages is quite annoying if you want to check for multiple materials.

grafik

i hope this helps to show what the legacy summary has to offer.

veger commented 4 weeks ago

Hm... that is interesting, thank you for describing your use-case.

So you from what I understood the things you are missing from the (new) SUmmary page are:

  1. Overview of total production (a sum of all producing pages for each item). Would you also need total sum of all consuming pages?
  2. Click on an item in the summary takes you to the correct page (and even line? :thinking: )
  3. Better visuals. Can you describe what is bothering you (I am not a UI designer and always make very plain UIs :stuck_out_tongue: )

Did I missing something? I guess we can make new tickets to see/discuss if we can include these features into the new Summary page, making the legacy summary page really obsolete.

(@have-fun-was-taken I reopened this ticket to finish the discussion on the legacy page, when it is concluded we can close this again)

XhenZui commented 4 weeks ago
Overview of total production (a sum of all producing pages for each item). Would you also need total sum of all consuming pages?

The net total so sum of all production minus sum of all consumption

Click on an item in the summary takes you to the correct page (and even line? 🤔 )

I don't consider this important, but it's nice to have.

Better visuals. Can you describe what is bothering you (I am not a UI designer and always make very plain UIs 😛 )

It's displaying all materials for every row which leads to the page becoming far too wide, also it's displaying a row for every page that you add to the summary, which leads to the whole thing also becoming far too tall when adding lots of pages. The legacy page fixes this by only displaying materials that you have selected, and also hiding pages that do not have the selected material or materials at all.

Did I missing something?

The two main things I'm missing in the new summary is the total sum of all production (see next picture) and the way you add all the pages to the summary.

341523736-5cb3f8fa-3375-4121-9613-3746488500ea

To me, it seems like the legacy summary and the new summary are kind of made for two different purposes. The new one is for a quick check including only a few pages, while the legacy one is for putting your whole factory in and seeing the grand total of everything. Maybe the ideal case would be too to have two separate summaries, one for displaying the whole factory at once like the old summary and one for the case where you only want to select a few pages for your summary.

If you want, I can show it to you live in discord sometime to make things more clear, the legacy summary page does a few things in a very good way.

Also, putting this discussion in a new issue/ticket would probably be good.

veger commented 3 weeks ago

I made two new tickets #173 and #174 as I think those two make a nice addition to the Summary page. While playing with full pY, I also notice that the overview becomes too big. That is why I added the 'show only issues', as that indicates things that need to be fixed in order to balance production and consumption.

But even then, it becomes too large (and clicking all the unbalanced items takes forever, I just made a issue for this #175).

it seems like the legacy summary and the new summary are kind of made for two different purposes.

It looks like it.

The new one is for a quick check including only a few pages

That was my intention yes. In the meanwhile (while I was building this) @ShadowTheAge made the Legacy Summary page. But never fully fleshed it out. That is why we dubbed it 'legacy' as we didn't fully understand it and it ~was~ is incomplete.

the legacy one is for putting your whole factory in and seeing the grand total of everything.

I like to idea to having way(s) to have a overview of the 'grand total of everything'! :heart: So I think it would be valuable to (further) think about this and possibly repupose the current 'Legacy Summary' into a Factory Summary of something.

I have no idea how this page is implemented and whether is it salvageable or we need to rework from a new start. @DaleStan, @Dorus any idea?

Dorus commented 3 weeks ago

Sorry i haven't looked at these pages too much at all yet, both in use and code.

They always gave me the idea i was using YaFC wrong and i should use them more, but i never fully understood them. Once they get more feature complete we should think about how to make them intuitive and/or add tutorial info.

XhenZui commented 3 weeks ago
the legacy one is for putting your whole factory in and seeing the grand total of everything.

I like to idea to having way(s) to have a overview of the 'grand total of everything'! ❤️ So I think it would be valuable to (further) think about this and possibly repupose the current 'Legacy Summary' into a Factory Summary of something.

This is what I thought exactly, one possibility could be that every page has a flag "add to total summary" and the legacy summary just automatically gets added all these pages.

I think most of the issues in the legacy summary are actually related to adding the pages and to the UI simply not telling the user how to use the summary.

shpaass commented 3 weeks ago

every page has a flag "add to total summary"

As a side note, I have one suggestion regarding the whole Summary topic: On the UI level, the summary should not bloat other pages.

In other words, I would be in favor of a new window to choose the pages that go into the summary, the window being opened from a summary page in some way.

However, I would advise against something like a dropdown on RMB when clicking on the page name, that has a switch whether to add the page to the summary.

Internally - sure, there can be a flag for each page that indicates whether it's included in the summary.

XhenZui commented 3 weeks ago

I created a new issue https://github.com/have-fun-was-taken/yafc-ce/issues/179 to discuss the changes to the legacy summary page we talked about here (i hope this is the right way to do this stuff).