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

feat: release 0.7.0 #63

Merged
merged 33 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b6685dd
feat: update name from Draw Steel to Draw Steel Initiative Tracker
Aug 10, 2024
78fd225
chore: update version for next release 0.6.0
Aug 11, 2024
872b0b4
feat: create a reaction toggle
Aug 12, 2024
d4bbe37
feat: double clicking sub list item row triggers centerPlayerOnTokens…
qfulsher Aug 12, 2024
8ccbf06
feat: wire up player access settings to enforce turn permissions (#58)
qfulsher Aug 13, 2024
1fe49be
feat: modify grouping options to disable similar to player access opt…
Aug 13, 2024
e5cfbf6
feat: fix pop scaling (#61)
dayvar14 Aug 31, 2024
d9e9b25
bug: correct settings button title
Oct 10, 2024
88ae7a9
feat: make settings more readable
Oct 10, 2024
a2cc2ab
bug: adjust active style and cursor when token item is clicked/double…
Oct 10, 2024
5428127
bug: fix added scrollbar width when not needed
Oct 10, 2024
8862ff9
feat: complete rework on grouping and token metadata (#62)
dayvar14 Oct 15, 2024
366a884
chore: formatting things
Oct 15, 2024
8b5c97b
fix: expanded group wont close when reduce to a single member
Oct 15, 2024
1edfa44
fix: typescript linting issues and remove unneeded packages
Oct 15, 2024
7dad351
chore: remove uneeded files
Oct 15, 2024
c7ad9f6
fix: remove custom coloring of toggables
Oct 15, 2024
e1a3698
fix: group/token names broken on empty input
Oct 15, 2024
523ab01
feat: make group names auto generate on group creation/split
Oct 15, 2024
acedeb7
feat: update group titles
Oct 15, 2024
2c7b905
feat: update version ready for release to 0.7.0
Oct 15, 2024
ee4bfa8
feat: add a metadata upgrader
Oct 15, 2024
cbf3f2c
fix: reaction colored black
Oct 16, 2024
9d45251
fix: grouping not updating token metadata correctly
Oct 16, 2024
a8d34c8
feat: seperate flags color based if they can modify them
Oct 16, 2024
2b016b5
chore: clarify settings
Oct 16, 2024
f16c417
feat: make it clearer what a player cant interact with
Oct 16, 2024
f1778de
fix: players able to see hidden tokens
Oct 16, 2024
ae0ca5e
feat: fix messaging if nothing on list
Oct 16, 2024
cc13cba
fix: bug where selects disappear
Oct 16, 2024
62a0f32
feat: fix broken inputs
Oct 16, 2024
0d0dbb6
fix: remove broken box shadows
Oct 16, 2024
70539d4
feat: make no scene screen look better
Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '14'

- name: Install dependencies
run: yarn install
- name: Install dependencies
run: yarn install

- name: Build
run: yarn build
- name: Build
run: yarn build
7 changes: 7 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
./src/icons/clear_circle.svg Adapted from
https://www.svgrepo.com/svg/502579/clear-circle

./src/icons/chevron-right.svg Adapted from
https://www.svgrepo.com/svg/533661/chevron-right

./src/icons/delete.svg Adapted from https://www.svgrepo.com/svg/488148/delete

./src/icons/discord.svg Adapted from https://www.svgrepo.com/svg/506463/discord
Expand Down Expand Up @@ -49,6 +52,10 @@ https://www.svgrepo.com/svg/529906/sort-from-top-to-bottom
./public/icons/sword_clash.svg .public/icons/sword_clash.png Adapted from
https://www.svgrepo.com/svg/321543/sword-clash

./public/icons/reaction_filled.svg ./public/icons/reaction_unfilled.svg
./src/icons/reaction_filled.svg ./src/icons/reaction_unfilled.svg
https://www.svgrepo.com/svg/355330/trigger

Licensed under CC by 4.0 (https://creativecommons.org/licenses/by/4.0/)

# Google Fonts
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# obr-draw-steel

[![version](https://img.shields.io/badge/version-0.5.2-red.svg)](https://github.com/dayvar14/obr-draw-steel/releases/tag/v0.5.2)
[![version](https://img.shields.io/badge/version-0.7.0-red.svg)](https://github.com/dayvar14/obr-draw-steel/releases/tag/v0.7.0)
[![GitHub Actions](https://github.com/dayvar14/obr-draw-steel/workflows/deployment/badge.svg)](https://github.com/dayvar14/obr-draw-steel/actions)
[![commits since version](https://img.shields.io/github/commits-since/dayvar14/obr-draw-steel/v0.5.2.svg)](https://github.com/dayvar14/obr-draw-steel/compare/releases/v0.5.2...main)
[![commits since version](https://img.shields.io/github/commits-since/dayvar14/obr-draw-steel/v0.7.0.svg)](https://github.com/dayvar14/obr-draw-steel/compare/releases/v0.7.0...main)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
[![github followers](https://img.shields.io/github/followers/dayvar14.svg?style=social&label=Follow&maxAge=2592000)](https://github.com/dayvar14?tab=followers)
Expand All @@ -11,13 +11,14 @@
> 1.0.0 along with an attempt to deploy the extension into the Owlbear Extension
> explorer. It currently is feature complete but may contain bugs.

## Draw Steel! - Owlbear Plugin
## Draw Steel Initiative Tracker - Owlbear Plugin

An unoffical MCDM Draw Steel initiave tracker for Owlbear Rodeo.
An unoffical MCDM Draw Steel TTRPG initiave tracker for Owlbear Rodeo.

Draw Steel! is a Draw Steel initiave tracker. Born out of a yearn for a digital
initiative tracker for the Draw Steel RPG, the repo strives to provide a
initiative tracker better suited for the rotating turns between friend and foe.
This project is a Draw Steel TTRPG initiave tracker. Born out of a yearn for a
digital initiative tracker for the Draw Steel TTRPG, the repo strives to provide
a initiative tracker better suited for the rotating turns between friend and
foe.

## Installing

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/sword_clash.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Draw Steel!</title>
<title>Draw Steel Initiative Tracker</title>
</head>
<body>
<div id="root"></div>
Expand Down
49 changes: 25 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "obr-draw-steel",
"private": true,
"version": "0.5.2",
"version": "0.7.0",
"homepage": "https://dayvar14.github.io/obr-draw-steel",
"type": "module",
"scripts": {
Expand All @@ -12,33 +12,34 @@
"preview": "vite preview"
},
"dependencies": {
"@owlbear-rodeo/sdk": "^2.1.0",
"clsx": "^2.1.0",
"ml-kmeans": "^6.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"styled-components": "^6.1.8",
"uuid": "^9.0.1",
"vite-tsconfig-paths": "^4.2.3"
"@owlbear-rodeo/sdk": "^3.0.0",
"clsx": "^2.1.1",
"lodash": "^4.17.21",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"styled-components": "^6.1.13",
"uuid": "^10.0.0",
"vite-tsconfig-paths": "^5.0.1"
},
"devDependencies": {
"@svgr/plugin-jsx": "^8.1.0",
"@svgr/plugin-svgo": "^8.1.0",
"@types/node": "^20.11.1",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"npm": "^10.3.0",
"prettier": "^3.1.1",
"sass": "^1.69.7",
"typescript": "^5.2.2",
"vite": "^5.0.11",
"@types/lodash": "^4.17.10",
"@types/node": "^22.7.5",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.1",
"@vitejs/plugin-react": "^4.3.2",
"eslint": "^9.12.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.12",
"npm": "^10.9.0",
"prettier": "^3.3.3",
"sass": "^1.79.5",
"typescript": "^5.6.3",
"vite": "^5.4.8",
"vite-plugin-svgr": "^4.2.0"
}
}
3 changes: 1 addition & 2 deletions popover.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/sword_clash.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Draw Steel!</title>
<title>Draw Steel Initiative Tracker</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/popover.ts"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions public/icons/reaction_filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/icons/reaction_unfilled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/sword_clash.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Draw Steel!</title>
<title>Draw Steel Initiatve Tracker</title>
</head>
<body>
<div id="root"></div>
Expand Down
94 changes: 66 additions & 28 deletions src/components/DrawSteel.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import InitiativeList from './InitiativeList/InitiativeList.tsx'
import ThemeWrapper from '../wrapper/ThemeWrapper.tsx'
import { Header } from './Header/Header.tsx'
import { Header } from './Header.tsx'
import { PermissionProvider } from '../context/PermissionContext.tsx'
import { PartyProvider } from '../context/PartyContext.tsx'
import { PlayerProvider } from '../context/PlayerContext.tsx'
import { TokenProvider } from '../context/TokenContext.tsx'
import { useEffect, useState } from 'react'
import { useEffect, useRef, useState } from 'react'
import { APP_HEIGHT } from 'config.js'
import { Action } from 'obr/action.ts'
import { SceneProvider } from 'context/SceneContext.tsx'
import { SettingsProvider } from 'context/SettingsContext.tsx'
import { GroupProvider } from 'context/GroupContext.tsx'
import { Popover, PopoverOptions } from './Popovers/Popover.tsx'
import { Footer } from './Footer.tsx'

const DrawSteel = () => {
const [listHeight, setListHeight] = useState(0)
const [popoverVisible, setPopoverVisible] = useState<boolean>(false)
const [popoverOptions, setPopoverOptions] = useState<PopoverOptions>()
const baseRef = useRef<HTMLDivElement>(null)

const onListHeightChange = (listHeight: number) => {
setListHeight(listHeight)
Expand All @@ -20,16 +25,17 @@ const DrawSteel = () => {
/* might want to refactor this in the future */
useEffect(() => {
const setNewAppHeight = async () => {
const headerHeight = 68
// extra height needed to be accounted for. Header and footer
const extraHeight = 78
const hrHeight = 1
const defaultListHeight = APP_HEIGHT - (headerHeight + hrHeight)
const defaultListHeight = APP_HEIGHT - (extraHeight + hrHeight)

/* needed because owl-bear-rodeo height clips the bottom of the list */
/* needed to match the manifest app height of 300px */
const padding = 32

const newHeight = Math.max(
headerHeight + hrHeight + listHeight + padding,
extraHeight + hrHeight + listHeight + padding,
defaultListHeight + padding,
)
await Action.setHeight(newHeight)
Expand All @@ -38,27 +44,59 @@ const DrawSteel = () => {
}, [listHeight])

return (
<ThemeWrapper className={'app-container'}>
<PlayerProvider>
<Header />
<hr />
<SceneProvider
loadingChildren={
<div className={'no-scene'}>
<p>Select a scene to start combat.</p>
</div>
}
>
<PartyProvider>
<PermissionProvider>
<TokenProvider>
<InitiativeList onListHeightChange={onListHeightChange} />
</TokenProvider>
</PermissionProvider>
</PartyProvider>
</SceneProvider>
</PlayerProvider>
</ThemeWrapper>
<div ref={baseRef} className={'app-container'}>
<ThemeWrapper className={'app-container'}>
{popoverOptions?.triggerRef && (
<Popover
isVisible={popoverVisible}
onClose={() => setPopoverVisible(false)}
triggerRef={popoverOptions?.triggerRef}
baseRef={baseRef}
width={popoverOptions.width}
height={popoverOptions.height}
>
{popoverOptions?.content}
</Popover>
)}

<PlayerProvider>
<Header />
<hr />

<SettingsProvider
loadingChildren={
<div className={'no-scene'}>
<p>Select a scene to start combat.</p>
</div>
}
>
<PartyProvider>
<PermissionProvider>
<GroupProvider>
<InitiativeList
onListHeightChange={(listHeight: number) =>
onListHeightChange(listHeight)
}
popover={{
openPopover: (options: PopoverOptions) => {
setPopoverOptions(options)
setPopoverVisible(true)
},
closePopover: () => {
setPopoverVisible(false)
},
isVisible: popoverVisible,
}}
/>
</GroupProvider>
</PermissionProvider>
</PartyProvider>
</SettingsProvider>
<hr />
<Footer />
</PlayerProvider>
</ThemeWrapper>
</div>
)
}

Expand Down
20 changes: 20 additions & 0 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Player } from '@obr'
import { useContext } from 'react'
import { PlayerContext } from 'context/PlayerContext'
import { SettingsProvider } from 'context/SettingsContext'

export const Footer: React.FC = () => {
const playerContext = useContext(PlayerContext)

return (
<div className='app-footer'>
<div className='app-footer-icons'>
{playerContext?.playerState.role === Player.PlayerRole.GM && (
<>
<SettingsProvider></SettingsProvider>
</>
)}
</div>
</div>
)
}
Loading