iamlogand / republic-of-rome-online Goto Github PK
View Code? Open in Web Editor NEWAn online adaptation of The Republic of Rome, a strategy board game
Home Page: https://www.roronline.com/
License: MIT License
An online adaptation of The Republic of Rome, a strategy board game
Home Page: https://www.roronline.com/
License: MIT License
The README file is too verbose and contains information that doesn't belong there. To fix this, make it more concise and move the details about setting up a local development environment to the wiki.
The account button in the top bar has a fixed width, which makes no sense considering that account names can be anywhere from 1-50 characters long.
Related to #56
Trajan is on-theme, but using it everywhere is a bit much. In most places, use a more readable/normal sans serif font like Gill Sans. Trajan should still be used for certain things, like names and larger text.
To solve the problem of dealing with overflowing text content in the UI, I already made a function that shortens strings and appends an ellipsis. Try replacing this with the text-overflow: ellipsis
CSS property.
Also implement this on the topbar account button because usernames can be up to 150 characters long.
Related to #50
Not much of a bug but rather an oversight that should be corrected.
The game entity's owner property is currently optional at the model-level. It should be set to required instead, because there is no logical reason for a game to exist without an user to take ownership of it from the moment they create it.
Create React App is no longer recommended by React. Switch to Next.js.
This should be as simple as creating a new Next.js app, then copying the source files and dependencies over.
EDIT: It wasn't!
For the sign in form, currently the user must actually click the submit button using their mouse. Pressing the enter key just closes the form, which is bad
Make the Senator Inspector able to support varying content dimensions determined after the content has been rendered, rather than before, without spilling over the edge of the page. This change will give the Senator Inspector the freedom to contain more dynamic content.
This can probably be done by converting the existing SenatorInspector
component into two components: container and content. Once the content component is initially renderred it can access it's own dimensions through getBoundingClientRect()
. The content component can then pass it's dimensions to the container component by setting the container's state, using state setters passed as props. Once these states are changed, the container will redetermine where to position itself using the updated state values. Ideally this will not create an infinite rerender loop because the content component will not actually change at any point since the initial render so React will not rerender it.
The API already supports this, so the only changes needed are in the frontend.
Tasks:
It's annoying having to pass token (and username) getters and setters down the component tree to every component that needs to access the API. Implement React Contexts to simplify access to these getters and setters since they are used so ubiquitously.
Using the modal for the sign in looks good, but making every page handle it's potential presence is annoying, so it's not worth it.
The redirect sign in page could still take the user back to the page they tried to access on successful submission, perhaps using some high level state that saves the last URL.
Part of #43
Introduce game participants - users who have joined a game.
API changes:
GameParticipant
model, which will represent many-to-many relationships between Game
and User
instances.Game
create method to also create an instance of GameParticipant
, making game owners participants by default upon game creation.Game
read collection method to include a list of participating usernames in the response.UI changes:
This approach allows separation of responsibilty at the model level for describing participation and ownership. This could be useful in a future version if the owner is given more advanced ownership-related operations, such as: not participating in their own game, leaving their own game, or transferring ownership to another user.
As well as showing the unrest level, we should show the forecasted chance (%) of the senate being overthrown when the people revolt. This would help communicate to the players when there is a significant danger of players being defeated.
Move the Python backend application into a Docker container. This will greatly increase parity of the development and production environments. Another benefit is that infrastructure configurations would be moved out of AWS and into the codebase, which makes future infrastructure changes easier to make (because AWS sucks).
Use a blue/green deployment strategy.
Currently, when a user's refresh token expires, they are signed out and sent to the home page, right back to square one, with no indication of what happened.
Instead, when this happens, the user should be informed that their session has expired.
Part of #43
Inform user that a game he is viewing got deleted and offer him a way to get back to the games page.
Currently existing users can sign in, but new users can't register. The only way to create a new account is through the Django admin console.
Make the user registration page functional. This will involve procuring an email server for email verification.
Users should be able to view a list of games.
Tasks:
The User
collection resource is currently located at /user/
, which is unconventional because the singular "user" is being used. This should be changed to "users".
The same issue exists for token resources.
It would be worth learning more about REST naming conventions and fixing anything that looks unconventional.
Add a unit test to the backend using Django’s test-execution framework and REST framework's test classes.
Add attributes to the backend game
model:
Add reference to this being fan made to both the landing page and the readme
Description of problem:
When using the VS Code "run and debug" to start the app, it opens in two windows.
Expected behavior:
The app opens in one window.
Add a join waitlist form to the home page.
Steps:
Currently, after game creation, the user is redirected to the game list page. Instead, redirect to the relevant game page.
The senator portrait shown within the senator inspector shouldn't have a dark border, because it's not a clickable button. This border should be removed when it's in the inspector.
It would be useful if users could see live changes to the participant list whilst they are on the game page without having to refresh the page. Implement web sockets to meet this requirement.
Currently a game can be deleted with a single click. Add a confirmation step to prevent accidental deletion.
Improve the initial load time of the game list page.
Part of #43
Game
collection resource GET method to include game IDs in the response.Game
singleton resource.Game
singleton resource.Trying to create a new game doesn't work anymore. With the Chrome dev tools console open, I can see that it's caused by a 500 internal server error in the console. This error is thrown with every click of the "Create" button.
It looks like this bug was introduced in #115 when host
was accidentally renamed to owner
in the Serializer during a merge conflict resolution - see the change here. For context, "owner" was the original name, but it was changed to "host" a couple of weeks ago.
Stop owners/hosts from being able to leave their own game. This needs to be enforced by the API and the UI.
Create a non-functional mockup for some parts of the in-game UI.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.