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

Che bato/deck page #164

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Che bato/deck page #164

wants to merge 26 commits into from

Conversation

CheBato
Copy link
Collaborator

@CheBato CheBato commented Mar 2, 2025

  • Added Deck page for annonymous users.
  • A player can add decks to localstorage from swustats or swudb.
  • A player can add decks to localstorage via the favourites check on the main page.
  • A player can add decks to localstorage in the lobby.
  • A player can use decks from localstorage in the main menu for quick games and custom games
  • A player can change his deck to one from localstorage in lobby.
  • Added error handling when a favourite deck suddenly becomes unlisted or other error while still being in the localStorage.
  • Added visual candy for the user when they take a look at their decks.
  • Added 3 types of sorts in the deckPage. by favourites, name and deck source.
  • Disabled order by in the detailed deckPage.

- Added deckPage, start.
- Added deck display on the Decks page.
- Added a new subpage for the DeckPage.
- Styled so it looks presentable.
- inbetween changes.
# Conflicts:
#	src/app/_components/_sharedcomponents/Cards/CardTypes.ts
- Made some changes to the deckPage and its functionality.
- Made some additions to the deckPage.
we can now import decks and see their details in the other page.
- Added percentage circle
- Added some visual polish.
- Finished with the implementation of the deckpage.
- Added some visual candy.
- Finished with the implementation of the deckpage.
- Added some visual candy.
- Cleaned up PR.
- Cleaned up PR.
- Added popup for leaving the game.
@danbastin
Copy link
Contributor

Really like how this page is shaping up. I have some nots but since a lot of this is on the fly and this is a relatively complex page it could serve as a good reason to catch up and chat. Let me know if you would have some time for that tomorrow.

Some things I might look at if you were going to work on anything before we have a chance to talk:

  1. I think for now we should just put the main deck and the sidebard into the same scroll box. Some people are reporting their deck getting cut off and until we have time to do something fancier I think it's better to just have them as once continue list. This applies to the lobby as well.
  2. one thing we can do to get this online quickly is just do what the current code does for now and save the link in local storage. This will be enough for decks and this page to be completely usable and we can add additional features from there if we decide to move things to the DB.

CheBato added 6 commits March 6, 2025 11:10
# Conflicts:
#	src/app/_components/_sharedcomponents/Popup/Popup.tsx
#	src/app/_components/_sharedcomponents/Popup/PopupVariant/LeaveGamePopup.tsx
- Added ability to save to localStorage
- They can't edit the decks
- On the list they can select their favourite deck by clicking on the star
- They can delete mulitple decks at once.
- they can enter both QuickGames and private/public lobbies with favourite decks.
Cleaned up for PR.
A little visual clean.
Cleaned a bug.
@CheBato CheBato marked this pull request as ready for review March 6, 2025 21:18
@CheBato CheBato requested a review from danbastin as a code owner March 6, 2025 21:18
Cleaned another bug.
@danbastin
Copy link
Contributor

Overall really good stuff. I'm not gonna nit picky here cause the important thing is that it's functinoal and we can clean it up later.

One thing I forgot to comment on is that I would really like for the lobby to default to showing the decks drop down at first if there are decks to be shown and have the button say "Load deck". Probably locaked above that would be a text link that says "import new deck" and clicking that would show the deck link input with a button saying "Import deck".

That may be a post feature thing unless you think you can whip that up quickly. But the purpose is just to save as much space there as we can but also be super clear about if the user is using one of their preexisting decks or loading up a new one. Let me know what you think.

Cleaned up PR.
@CheBato
Copy link
Collaborator Author

CheBato commented Mar 7, 2025

Overall really good stuff. I'm not gonna nit picky here cause the important thing is that it's functinoal and we can clean it up later.

One thing I forgot to comment on is that I would really like for the lobby to default to showing the decks drop down at first if there are decks to be shown and have the button say "Load deck". Probably locaked above that would be a text link that says "import new deck" and clicking that would show the deck link input with a button saying "Import deck".

That may be a post feature thing unless you think you can whip that up quickly. But the purpose is just to save as much space there as we can but also be super clear about if the user is using one of their preexisting decks or loading up a new one. Let me know what you think.

I got it working :D I would only kindly ask you if you could just move it to where it you think it would be best. Otherwise I think it was a great idea to include the swapping between one and the other. Let me know what you think!

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

Successfully merging this pull request may close these issues.

2 participants