Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages page view mode #309

Closed
MiguelSOliveira opened this issue Dec 26, 2021 · 41 comments
Closed

Packages page view mode #309

MiguelSOliveira opened this issue Dec 26, 2021 · 41 comments

Comments

@MiguelSOliveira
Copy link
Contributor

Would be cool if we could switch view modes in packages page to show as a list, instead of a grid.
This way we could see the items' names instead of their picture, which i think would be much more useful.

@FrutyX
Copy link
Collaborator

FrutyX commented Dec 26, 2021

Hm, making an independent list would be better, but that would require GCA to crawl the packages, which is server heavy, bad idea.

So what is left is editing the current package page, removing the grinds, item images, but you still have to get the description from the item tooltips, messy.

We'll see, Gram and Apo are good at developing things, it's all about getting the right idea.

@MiguelSOliveira
Copy link
Contributor Author

MiguelSOliveira commented Dec 26, 2021

it would not require GCA to crawl the packages any more than it currently does, from what I can see. Gladiatus already returns the tooltip data in the page's html.

Something like this:

    <div data-no-combine="true" data-no-destack="true" data-container-number="-1061422"><div style="left:0px;top:0px" class="item-i-9-7 ui-draggable ui-droppable" data-content-type="1024" data-content-size="1" data-enchant-type="null" data-price-gold="25867" data-tooltip="[[[&quot;Manius Star talisman of Stars&quot;,&quot;lime; text-shadow: 0 0 2px #000, 0 0 2px lime&quot;],[&quot;Damage +1&quot;,&quot;#DDD&quot;],[&quot;Charisma +25&quot;,&quot;#DDD&quot;],[&quot;Charisma +2% (+2)&quot;,&quot;#DDD&quot;],[&quot;Intelligence +25&quot;,&quot;#DDD&quot;],[&quot;Critical attack value +25&quot;,&quot;#DDD&quot;],[&quot;Level 96&quot;,&quot;#808080&quot;],[&quot;Value 25.867 &lt;div class=\&quot;icon_gold\&quot;&gt;&lt;\/div&gt;&quot;,&quot;#DDDDDD&quot;],[&quot;Durability 23040\/23040 (100%)&quot;,&quot;#00ff00&quot;],[&quot;Conditioning 0\/5760 (0%)&quot;,&quot;#808080&quot;]]]" data-comparison-tooltip="null" data-level="96" data-hash="f40-9-7-jyj-0-3g-i-0-0-0-0-0-0-0-0-hs0-0-0" data-amount="1" data-position-x="1" data-position-y="1" data-measurement-x="1" data-measurement-y="1" data-basis="9-7"></div></div>

The attribute "data-tooltip", should give GCA what it needs, unless I'm mistaken. (The above item's name is "Manius Star talisman of Stars")

But I'm sure the devs have a better understanding of what it would entail..

@MiguelSOliveira
Copy link
Contributor Author

MiguelSOliveira commented Dec 26, 2021

Just as a proof of concept, I've written a JS snippet (it's not pretty, but it works to show it can be done fairly easily).

document.querySelectorAll('[class^=item-]').forEach(item => {
    const tooltipData = item.getAttribute('data-tooltip')
    
    if (tooltipData !== null) {
        console.log(JSON.parse(tooltipData)[0][0][0])
    }
})

The following outputs the packages by name:
imagem

@GramThanos
Copy link
Member

What is the purpose of this? Why do you need a list of the items names?

Describe what exactly you want to achieve so that we can understand what exactly is needed.

@MiguelSOliveira
Copy link
Contributor Author

MiguelSOliveira commented Dec 27, 2021

For example, when I filter packages by "Scrolls" I get this:
imagem

From the images, I have no idea what each scroll actually is. It provides no information and I have to hover on each images which is tedius.
I think if instead of images, we had a list with the actual names we could see the results much better.

Something like a vertical list with icon, and info...
imagem

Does it make sense?

@FrutyX
Copy link
Collaborator

FrutyX commented Dec 27, 2021

Well, I don't think we need to make a whole list, we can just use the packages the way they already are and add the name from a tooltip somewhere above or under the item image, it will need some playing with CSS (font size, color...) but it should do the trick.

I get that there isn't much space to add it, especially for long item names, it will need some playing with it.

@FrutyX
Copy link
Collaborator

FrutyX commented Dec 27, 2021

As an example (for Gram):

example

example2

But it's just an idea.

@GreatApo
Copy link
Member

Current list view implementation:
image

And with small items:
image

@SleepingShadow-bit
Copy link
Collaborator

Is it correct that the "Improve items layout" setting must be activated for the "list view"?

Without "improve items layout"
IMG_20220714_062156

It's a yes. Is there some kind of setting protection (note) or should we just write it explicitly in the documentation?

@GreatApo
Copy link
Member

Is it correct that the "Improve items layout" setting must be activated for the "list view"?

Without "improve items layout"

Oups... I need to fix this

@SleepingShadow-bit
Copy link
Collaborator

SleepingShadow-bit commented Jul 14, 2022

Can somebody add the de translation?

settings : {
	category_packages$list_view_layout : "Zeige Pakete als Listen-Ansicht",
}

@SleepingShadow-bit
Copy link
Collaborator

Is it correct that the "Improve items layout" setting must be activated for the "list view"?
Without "improve items layout"

Oups... I need to fix this

Hmm. I am Online via smartphone. Do u have the same bug on pc?
IMG_20220714_230613

@GreatApo
Copy link
Member

Hmm. I am Online via smartphone. Do u have the same bug on pc?

I think I fixed that by merging some feature in the compact view. Do you have the last version on you phone? (You will see the layout view option as a drop down)

@SleepingShadow-bit
Copy link
Collaborator

Yes. I have the drop down menu (really nice).

@SleepingShadow-bit
Copy link
Collaborator

Same on PC
Screenshot_2

@FrutyX
Copy link
Collaborator

FrutyX commented Jul 15, 2022

I believe I am seeing the same.

@FrutyX
Copy link
Collaborator

FrutyX commented Jul 16, 2022

I think the various item heights are causing the problems, it's a big mess... However enabling the small items size feature does fix it completely, but the big ones are problematic.

FrutyX added a commit that referenced this issue Jul 16, 2022
@FrutyX
Copy link
Collaborator

FrutyX commented Jul 16, 2022

@SleepingShadow-bit can you get the latest commit and test it now? It's experimental, I can see more adjustments are needed.

@GreatApo
Copy link
Member

I have found a problem, it seems like a page loading problem, sometimes it gets loaded badly, I don't think it's related to the changes I made today, a page refresh does fix it, it can occur sometimes.

That may be due to compact style code running before the list changes...

@FrutyX
Copy link
Collaborator

FrutyX commented Jul 16, 2022

Or perhaps I did really caused it, but in my defense - I said it was experimental :D.

@FrutyX
Copy link
Collaborator

FrutyX commented Jul 16, 2022

10px seems to be fine, anything above that - problematic, unless more changes.

And scratch that too, small items (like amulets) are having problems with 10px too, not enough space.

@FrutyX FrutyX removed the 🐛 bug label Jul 16, 2022
@FrutyX
Copy link
Collaborator

FrutyX commented Jul 16, 2022

Alright, it's probably half and a half, Apo is probably right too, with the last commit from me, it's loading fine, but I told GCA to load 100 pages, it did occur but not even every time, only sometimes and it seems scrolling too fast is also helping to recreate it, so it is related to page loading.

I will not touch this anymore, other than that I think it's fine, but god knows what Sleeping will find again :D.

@SleepingShadow-bit
Copy link
Collaborator

Guys it's look good =)
Thank u for the fix =)

@SleepingShadow-bit
Copy link
Collaborator

Ohoo now you have also implemented my wish =) - - > #354

@SleepingShadow-bit
Copy link
Collaborator

the latest GCA Version
Number of pages to load: 2
last page:
Screenshot_2

second last:
Screenshot_3

and the side who is ok
Screenshot_4

@FrutyX
Copy link
Collaborator

FrutyX commented Jul 18, 2022

Hmm, I do not have such a problem, did you tried a simple page refresh? I know this feature is problematic during the page load, but like I said, mine is fine.

Console is clear I suppose? What browser are you running?

@SleepingShadow-bit
Copy link
Collaborator

am confused now Tried it several times. And in the meantime cleared cache and data. Now everything ok!

@SleepingShadow-bit
Copy link
Collaborator

Could it be that this is currently a cache and load issue? The error as shown above keeps coming back. And when removing packages, it doesn't update automatically, so I have to reload the page manually. Am I the only one with this issue?

I will test more and more

@FrutyX
Copy link
Collaborator

FrutyX commented Jul 19, 2022

I will add a bug label to it, I know there are problems, most importantly I want the boys to focus on the completely broken features first, we will see about this one.

@FrutyX FrutyX added this to the v4.3.6 milestone Jul 23, 2022
@FrutyX
Copy link
Collaborator

FrutyX commented Jul 24, 2022

I've just met a Gladiatus bug - the whole first page did not loaded, there was only text saying "no packages", I have disabled all extensions, and it was Gladiatus.

Hard to work on something, when the game in its core doesn't work as it should....

@FrutyX
Copy link
Collaborator

FrutyX commented Aug 5, 2022

@GramThanos Your code analyzing skills may be also needed here, I only want you to check this, and if something is bad, to do code improvements to prevent the page, to be badly loaded.

However like I said, for example on my merged server, I often have server lags, timeouts, and that is affecting the packages a lot (items not loading or not loading in time).

GramThanos added a commit that referenced this issue Aug 5, 2022
GramThanos added a commit that referenced this issue Aug 5, 2022
@GramThanos
Copy link
Member

I don't see any problem on this.

@FrutyX
Copy link
Collaborator

FrutyX commented Aug 5, 2022

Perfect, report here any bugs if anyone see some.

If you see this, it's only the game loading your items, and sometimes it can take a while, or does not load at all. Not a GCA bug.

loadingpackages

@GramThanos
Copy link
Member

image

@FrutyX
Copy link
Collaborator

FrutyX commented Aug 6, 2022

Looking good.

@FrutyX
Copy link
Collaborator

FrutyX commented Sep 13, 2022

Implemented in v4.3.6, closing, re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants