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

Feed config expandGroup does not work as expected #35

Open
madduck opened this issue Dec 24, 2024 · 4 comments
Open

Feed config expandGroup does not work as expected #35

madduck opened this issue Dec 24, 2024 · 4 comments

Comments

@madduck
Copy link
Contributor

madduck commented Dec 24, 2024

I am playing with a test tournament. I have a feed that provides a couple of games, each with a draw name in the "field" attribute:

image

Unfortunately, if I pass expandGroup as part of the feed config like so:

% curl --basic --user squore:tinnit http://192.168.122.1:8080/matches?court=1
{
  "config": {
    #[…] ,
    "expandGroup": "Poule 1"
  },
  "matches": […]
}

no change is visible, i.e. if I refresh the feed, the first group is still expanded, and not the second.

Note that this is the same if I opt to "Order by Court". My courts are named e.g. "Court 1", but setting expandGroup to "Court 1" (or "court 1" due to court names being lower-cased) doesn't have the desired effect either.

@obbimi
Copy link
Owner

obbimi commented Dec 25, 2024

expandGroup is indeed not working. I've removed it from the documentation.
To get one or more groups expanded prefix the name of the group with a '+'

obbimi pushed a commit that referenced this issue Dec 25, 2024
obbimi pushed a commit that referenced this issue Dec 25, 2024
@madduck
Copy link
Contributor Author

madduck commented Dec 25, 2024

To get one or more groups expanded prefix the name of the group with a '+'

This does not seem to work. If I prefix the "field" of a match (which seems to be the group name), or the court name with a '+', this somewhat has the desired effect, but only because it actually causes that group to be listed first, alphabetically sorted before the rest:

image
image

This works for me as a hack for now, but it's not possible to actually expand more than one group this way.

@obbimi
Copy link
Owner

obbimi commented Dec 25, 2024

Can you try and 'divide' your matches in 'sections' like in this example

https://squore.double-yellow.be/demo/demo.matches.json

For this example the second section name "+Session 4, Week 3, no Ids" will be expanded by the app.

This should allow your matches to be grouped by whatever you want: some people want them grouped by court, i typically use a 'week'

FYI: If no section has a plus in front of it, the first section is typically expanded by the app.

@madduck
Copy link
Contributor Author

madduck commented Dec 26, 2024

I now got this working, somewhat, using the following JSON structure:

image

If I load the feed for the first time, the first group ("No court assigned") always gets opened, but also the one for Court 2. If I collapse the first group and reload, then it stays collapsed.

I also wonder why "No court assigned" shows up first, but I think this may be because capital letters sort before lowercase letters, and #34

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

No branches or pull requests

2 participants