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

FMG 2.0: Codebase refactoring and modernization #842

Draft
wants to merge 195 commits into
base: master
Choose a base branch
from
Draft

FMG 2.0: Codebase refactoring and modernization #842

wants to merge 195 commits into from

Conversation

Azgaar
Copy link
Owner

@Azgaar Azgaar commented Jun 24, 2022

Description

Starting working on a major code refactoring and modernization.

Goals:

Contract changes as of today

Regiments:

  • state.military is renamed to state.regiments
  • regiments contract is reworked

Routes:

  • pack.cells.road is renamed to pack.cells.route
  • pack.cells.route values are repurposed, now 1 means road, 2 - trail, 3 - seaRoute
  • pack.routes now stores all relevant routes data

Diplomacy:

  • Ongoing wars are not longer stored in pack.states[0].diplomacy
  • Historical campaigns are not longer stored in pack.states[x].campaigns
    => Both are now stored as an array in pack.events.conflicts

Provinces:

  • pack.states[x].provinces is removed. Now states don't store info about their provinces

Labels:

  • text-anchor for '#labels' element is changed from 'start' to middle. All child tspan elements now should have attribute x equal to 0 instead of a calculated value

Type of change

  • Other (architecture change)

Versioning

  • Version is updated
  • Changed files hash is updated

@Azgaar Azgaar self-assigned this Jun 24, 2022
@Azgaar Azgaar changed the title Vite Migration to es modules using Vite Jun 24, 2022
@Azgaar Azgaar added don't merge POC Proof of Concept labels Jun 24, 2022
Repository owner deleted a comment from netlify bot Jun 24, 2022
@goteguru
Copy link
Collaborator

goteguru commented Jun 26, 2022 via email

@Azgaar
Copy link
Owner Author

Azgaar commented Jun 26, 2022

It's not necessary at all. But that is one-time action that will allow a lot of cool things in the future. It also forces to write a better code and think a lot about the structure

@goteguru
Copy link
Collaborator

goteguru commented Jun 26, 2022 via email

@Azgaar
Copy link
Owner Author

Azgaar commented Jun 26, 2022

Do you mean hot module replacement? If so, it works just fine out of the box.

The template I used is a very basic vanilla-js + typescript:
https://stackblitz.com/edit/vitejs-vite-epqe9h?file=index.html&terminal=dev

@goteguru
Copy link
Collaborator

goteguru commented Jun 26, 2022 via email

@RyanGuild
Copy link
Contributor

Hey let me lead with. This tool is incredible it is the number 1 tool I use to run my Pathfinder campaign.

I was about to open an Issue called Typescript, but wait here me out I'll work on it. Because I feel like you have built a big part of an open source gaming ecosystem but the state of the main branch is untenable to take contributions. So I am writing this here to reach out offer some time to try to get this merged. I have some experience with visual regression testing with the 3Dmol project that might be able to give you more confidence releasing this.

Looks like the right direction to take the project and a huge amount of effort.

reply here if you wanna start a thread I'll see it if its in the next few days

@Caellian
Copy link

remove jQuery dependency, to do this need to come up with a custom solution for Dialogs (e.g. Web Component)

<dialog> (caniuse).

@Azgaar
Copy link
Owner Author

Azgaar commented Oct 17, 2024

Hey let me lead with. This tool is incredible it is the number 1 tool I use to run my Pathfinder campaign.

I was about to open an Issue called Typescript, but wait here me out I'll work on it. Because I feel like you have built a big part of an open source gaming ecosystem but the state of the main branch is untenable to take contributions. So I am writing this here to reach out offer some time to try to get this merged. I have some experience with visual regression testing with the 3Dmol project that might be able to give you more confidence releasing this.

Looks like the right direction to take the project and a huge amount of effort.

reply here if you wanna start a thread I'll see it if its in the next few days

Hello. There is modernization work going on almost every day. But it turned out that the idea or a full migration is too complex, so currently I prefer to implement smaller changes. Once all separate aspects are there, I will consider getting back to migration to modern build tools and TS.

@Azgaar
Copy link
Owner Author

Azgaar commented Oct 17, 2024

remove jQuery dependency, to do this need to come up with a custom solution for Dialogs (e.g. Web Component)

<dialog> (caniuse).

We know about the dialog element :). It can be used as a base for a custom component as we need it to be much more functional.

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

Successfully merging this pull request may close these issues.

6 participants