From 54c30b2579586dd1c10cab79935be49a7c77d09c Mon Sep 17 00:00:00 2001 From: Daithi Hearn Date: Tue, 28 Feb 2023 13:55:47 +0100 Subject: [PATCH 1/3] UI Improvements --- src/assets/img/dummy.png | Bin 0 -> 3475 bytes src/assets/img/mycards.png | Bin 0 -> 5220 bytes src/components/Game/Buying.tsx | 6 +- src/components/Game/GameWrapper.tsx | 2 +- src/components/Game/MyCards.tsx | 116 ++++++++++-------- src/components/Game/SelectSuit.tsx | 4 +- .../GameStats/WinPercentageGraph.tsx | 23 +++- src/components/MyGames/MyGames.tsx | 2 +- src/components/StartNewGame/StartNewGame.tsx | 25 +++- src/pages/Game/_game.scss | 14 ++- src/pages/Home/_home.scss | 7 ++ src/utils/FormattingUtils.ts | 3 + 12 files changed, 130 insertions(+), 72 deletions(-) create mode 100644 src/assets/img/dummy.png create mode 100644 src/assets/img/mycards.png diff --git a/src/assets/img/dummy.png b/src/assets/img/dummy.png new file mode 100644 index 0000000000000000000000000000000000000000..3db7d365b13ee930e9a591c82079b51901f79232 GIT binary patch literal 3475 zcmc&$i96KW8y~8hEI0jBOkr{j5+Q`KUR!*v-5C2WTVpq7vJA>{BXP}C$TD2j=*w7} ztf3@#vP^N!Xc*)ULWZo3W&Gy;6Tja%&pFR|-silZ^FE*V^StNHzV2WpCVWm90)dDD z))qG)5J5rynI!ZRe-9MVZiPSu(!czz^kN(FZ^YeVEDoI?g zi*ssr*}F947;!Id6O~XRAeVjnaq(mGPE*6zi$$e7*_JLhv}faHuiRI&-v29pY(aO} zGXGe)vPbczVWYL`83VT!KbI!-tnzHp^YahYZ{p~BQ89FttMqoIRDXC>t!i9Z@M%Cb z;Dl!U(?7E`FGY)!#xC?-d$KJd!1Jf66KoY+p}Eo`)n>oXa^D=zU|TT$v2Pu7;AtF5 z#(|VTBIZsoE51A5yCp#|gLp@!YNcK$t=Ms7IpQ+rsA%{RNk)V{>xddQty0OU@wB7x z=xO0&GY7d{%Ev{g1aYX8C^D|p7y@0o6n{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AULh$tp+{v#q-9cA)*~Xld<2oKrD>B_UsnjM%O;v15*<=g$_*9|=2Ha6A_e5)cG1l#69-&#shT_Md^fTkB z&YRz?*F&>N(wqSe+LscjkL)I8_>uVkzVGx)*!6AiLO4avjGF%2@dB0(7IkKRcmE4| CwO$|q literal 0 HcmV?d00001 diff --git a/src/assets/img/mycards.png b/src/assets/img/mycards.png new file mode 100644 index 0000000000000000000000000000000000000000..af734b56927d16c9fe9cf765b82adedcfbd4d575 GIT binary patch literal 5220 zcmdT|i8mB%7az0OHAZMgwwG3f*H|<5oh+r0CHpX8W)NeEnIT1#$~t2$*@_~&5mS*c zgUAwwNl|t+Wy$t=|BUZE%X!W{&wcJW&%M9@$0^|i|pB|=ZVi{dE-gVt=eZ>EmIC`_|N&E zv{$=nvFS7dX|O_-wJO1L<6Z4g&#g>mwYA<$VPP|{h-uR2`Fy2vVeR%+*zA%=egLFs zC;WF%bRO3~DN)&!Y?C%4)a!-Z{LK_Ir%URy;j{myDqHS;h#2{<)o+##DLm^+`HiZz zR1(v5S@Cjubz}DIY;M`{OclSlQEgo4sG`Pb>uI9*30##@cmZ0}O38;$E#m2u+iD7U z;qnpLE_3R}QLcUO0hJ7!lg@}VNr4LEJG0ww4%mdINbj(>_IFQ^R*#MC!MS20$!JzY zN4iH-H1JjtS+Qj0r6!4DKeQBbE)pyl3_3OzV#@+46G)FwJJyQY^AC&iL)d$1?Pqxe zr-5-n@wn=^e0>07Q6T~(DG4kw>%9hzBH#jW2ZfkFn;`eMVTH4#^bdz#;r6kyFa;d^ zH;P}EXBk)!TXj zuTaGQ_AM|7{9%1bCZHSLCAhXsSc}_i-`uN;IHnZ!eTp_vGqAS&rOD{g39J97`LvK1 zN{%^;1m*IfWO5jO~f!7764JNa8=A-G? z=!Nt;l2qRw^6`|xb8>mFfiox_uo<$Ol6+e4iJGv3ip>5UU^mbr%Q~oemFETI1sI!_ z9HDon8%x*8+GO&x|G;Y7`#OFm(m#5P|7rb2if%=@IB_YG@AM|l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7)U@*? z>?ejDakALmxkWeN2%Oil<8frml)>t|SCSSUkDgx3rBHa%@TxUWz#xspgGjDvH|hw_ zA$3{OvQB60Wg=FKQN;kF&{8r=<%!``j|q{3rHq*XffH(;x}d)%Xh?6Upmf+{C;M1;i}tv%eK@I zm6L5cGeNac11R>I8b?R(%;<>N&ZD%!ns?egmEZnDdjT9zpln@Rk@@TFzmdX8rFoO2=^#_hZ`{}TD75Qpg(k1l*j zv1qLPZ7o3Wp&!GDV=57pcsS_6-)8N4hS=I2PCI<7sh1f5EZ+Du8jE`eER#|(j2O-#%I!3 zjWZ%&3%`hgNZ2FGk5IG@zX#(BB@B zuCqXL&}_DN-bw*w$E>p;E^Jzc$ru32l*Db$Mp1WxXucFoYlBTI8}!pz zHrqc)mGh}=m>Orpxr8u`|*8 zUncvFz(QQ%FERCPp=n`Q-YFE-q)ynbNoLd}0>TXBXx{(PEw*=C=b9JL_SNHsxSLmJ z%!hyd+(`cM$;a54>pQ^4ygAs0v}w_qvwQ?j%hxEzqTq$#{vO5}uzV=(Q_)1}OE(^+ zvYsIPXD5X^YSV(52g*D>XNoU`y3?KG8|^JqxFJAFtmspzQCu%%>;^7i;g}#2jT97E zc7J;E9>=r)YZ9eJg(*8)f+-u?P-xy(E+~*t{I6b7pxq%8dl@Pq6=gA2@a-Z3`z&>z z@!Z<1ab%vs$aih0-J{9Rwkyj#NvdDlEE-EE)6KUb{ZEu9ze-Y{YOy4%+uOnSg97KL z4U95)19fTyn{&|d`;U^N%IwY zlj3U%XB`8w2HMp>vmzf`<*TI}48%8zM^R6`V_Q@AKhsFMB;DZmpWw~T@3}f4sAJ=G z_2SF!t62-`m90%Bn6th2Rw { ) : null} diff --git a/src/components/Game/GameWrapper.tsx b/src/components/Game/GameWrapper.tsx index 9fb8ed2..60cd8b7 100644 --- a/src/components/Game/GameWrapper.tsx +++ b/src/components/Game/GameWrapper.tsx @@ -23,7 +23,7 @@ const GameWrapper = () => { - + {!iamSpectator ? : null} diff --git a/src/components/Game/MyCards.tsx b/src/components/Game/MyCards.tsx index 28e7e78..3da7a5b 100644 --- a/src/components/Game/MyCards.tsx +++ b/src/components/Game/MyCards.tsx @@ -34,6 +34,14 @@ import { } from "../../caches/AutoPlaySlice" import parseError from "../../utils/ErrorUtils" +const EMPTY_HAND = [ + { ...BLANK_CARD, selected: false }, + { ...BLANK_CARD, selected: false }, + { ...BLANK_CARD, selected: false }, + { ...BLANK_CARD, selected: false }, + { ...BLANK_CARD, selected: false }, +] + const MyCards: React.FC = () => { const dispatch = useAppDispatch() const gameId = useAppSelector(getGameId) @@ -220,61 +228,61 @@ const MyCards: React.FC = () => { - {showDummy && ( - - - - {provided => ( -
- {myCards.slice(5, 10).map((card, index) => { - const draggableId = `${card.name}${ - card.name === BLANK_CARD.name - ? index - : "" - }` - return ( - - {provided => ( -
- - handleSelectCard( - card, - event, - ) - } - src={`/cards/thumbnails/${card.name}.png`} - className={getStyleForCard( + + + + {provided => ( +
+ {(showDummy + ? myCards.slice(5, 10) + : EMPTY_HAND + ).map((card, index) => { + const draggableId = `${card.name}${ + card.name === BLANK_CARD.name + ? index + : "" + }` + return ( + + {provided => ( +
+ + handleSelectCard( card, - )} - /> -
- )} -
- ) - })} - {provided.placeholder} -
- )} -
-
-
- )} + event, + ) + } + src={`/cards/thumbnails/${card.name}.png`} + className={getStyleForCard( + card, + )} + /> +
+ )} +
+ ) + })} + {provided.placeholder} +
+ )} +
+
+
{round?.status === RoundStatus.PLAYING ? ( diff --git a/src/components/Game/SelectSuit.tsx b/src/components/Game/SelectSuit.tsx index a825912..9c19958 100644 --- a/src/components/Game/SelectSuit.tsx +++ b/src/components/Game/SelectSuit.tsx @@ -162,8 +162,8 @@ const SelectSuit = () => { ) : ( - )} diff --git a/src/components/GameStats/WinPercentageGraph.tsx b/src/components/GameStats/WinPercentageGraph.tsx index 62491ab..f89ac04 100644 --- a/src/components/GameStats/WinPercentageGraph.tsx +++ b/src/components/GameStats/WinPercentageGraph.tsx @@ -10,9 +10,18 @@ import StatsService from "../../services/StatsService" interface Props { player: PlayerProfile last3Months: boolean + width?: number + height?: number + showLegend?: boolean } -const WinPercentageGraph: React.FC = ({ player, last3Months }) => { +const WinPercentageGraph: React.FC = ({ + player, + last3Months, + width = 300, + height = 300, + showLegend = true, +}) => { const dispatch = useAppDispatch() const { enqueueSnackbar } = useSnackbar() const [stats, setStats] = useState([]) @@ -46,7 +55,6 @@ const WinPercentageGraph: React.FC = ({ player, last3Months }) => { labels: ["Win", "Loss"], datasets: [ { - label: "My Win Percentage", data: [wins.length, filteredStats.length - wins.length], backgroundColor: ["rgb(54, 162, 235)", "rgb(255, 99, 132)"], hoverOffset: 4, @@ -61,12 +69,15 @@ const WinPercentageGraph: React.FC = ({ player, last3Months }) => { plugins: { title: { display: true, - text: `Win Percentage (${( + text: `${( (wins.length / filteredStats.length) * 100 - ).toFixed(1)}%)`, + ).toFixed(1)}% win rate`, position: "bottom", }, + legend: { + display: showLegend, + }, }, } }, [wins, filteredStats]) @@ -78,8 +89,8 @@ const WinPercentageGraph: React.FC = ({ player, last3Months }) => { ) : ( diff --git a/src/components/MyGames/MyGames.tsx b/src/components/MyGames/MyGames.tsx index 045ea89..7699fe1 100644 --- a/src/components/MyGames/MyGames.tsx +++ b/src/components/MyGames/MyGames.tsx @@ -106,7 +106,7 @@ const MyGames = () => { { name: "Date", selector: row => row.timestamp, - format: row => moment(row.timestamp).format("lll"), + format: row => moment(row.timestamp).format("llll"), sortable: true, }, { diff --git a/src/components/StartNewGame/StartNewGame.tsx b/src/components/StartNewGame/StartNewGame.tsx index a6eee05..68e8fb7 100644 --- a/src/components/StartNewGame/StartNewGame.tsx +++ b/src/components/StartNewGame/StartNewGame.tsx @@ -96,7 +96,7 @@ const StartNewGame = () => { Image Preview @@ -108,9 +108,28 @@ const StartNewGame = () => { sortable: true, }, { - name: "Stats (3 months)", + name: "Last 3 months", cell: (pp: PlayerProfile) => ( - + + ), + center: true, + }, + { + name: "All Time", + cell: (pp: PlayerProfile) => ( + ), center: true, }, diff --git a/src/pages/Game/_game.scss b/src/pages/Game/_game.scss index 8ca023b..bc40c98 100644 --- a/src/pages/Game/_game.scss +++ b/src/pages/Game/_game.scss @@ -8,7 +8,7 @@ } .cardNotSelected { - opacity: 0.9; + opacity: 1; filter: brightness(70%); } @@ -21,6 +21,18 @@ border-width: 5px; border-radius: 10px; padding: 2px; + background-image: url("/assets/img/mycards.png"); +} + +.dummy { + background-image: url("/assets/img/dummy.png"); +} + +.gameContainer { + border-style: solid; + border-width: 5px; + border-radius: 10px; + padding: 2px; } // .carpet { diff --git a/src/pages/Home/_home.scss b/src/pages/Home/_home.scss index 2b99c75..59ccbc9 100644 --- a/src/pages/Home/_home.scss +++ b/src/pages/Home/_home.scss @@ -78,6 +78,13 @@ border-radius: 50%; } +.avatar-large { + vertical-align: middle; + width: 100px; + height: 100px; + border-radius: 50%; +} + .clickable:hover { cursor: pointer; } diff --git a/src/utils/FormattingUtils.ts b/src/utils/FormattingUtils.ts index bcc5404..b99a9fb 100644 --- a/src/utils/FormattingUtils.ts +++ b/src/utils/FormattingUtils.ts @@ -1,3 +1,5 @@ +const MAX_LENGTH = 20 + export const FormatName = (name: string) => name .split("@")[0] @@ -9,3 +11,4 @@ export const FormatName = (name: string) => word.slice(1).toLocaleLowerCase(), ) .join(" ") + .substring(0, MAX_LENGTH) From 9cc59d5a254892eeb46b6418592c275d2eee69f5 Mon Sep 17 00:00:00 2001 From: Daithi Hearn Date: Tue, 28 Feb 2023 13:56:23 +0100 Subject: [PATCH 2/3] Enable Automerge Hoefully fixing the conditional on the update manifest step --- .github/workflows/publish-to-dockerhub.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-to-dockerhub.yml b/.github/workflows/publish-to-dockerhub.yml index c91a578..27ce676 100644 --- a/.github/workflows/publish-to-dockerhub.yml +++ b/.github/workflows/publish-to-dockerhub.yml @@ -24,7 +24,7 @@ jobs: path: "public/manifest.json" prop_path: "version" - name: Update manifest.json version from ${{ steps.manifestversion.outputs.prop }} to ${{ github.ref_name }} - if: ${{ steps.manifestversion.outputs.prop }} != ${{ github.ref_name }} + if: ${{ steps.manifestversion.outputs.prop != github.ref_name }} uses: jossef/action-set-json-field@v2 with: file: public/manifest.json @@ -44,6 +44,7 @@ jobs: tags: "latest, ${{ github.ref_name }}" - name: Create PR with version changes + id: cpr uses: peter-evans/create-pull-request@v4 with: token: ${{ secrets.PAT_PR }} @@ -52,6 +53,7 @@ jobs: body: | Update latest version (${{ github.ref_name }}) branch: update-version-${{ github.ref_name }} + delete-branch: true base: main add-paths: | package.json @@ -60,3 +62,10 @@ jobs: update assignees: | ${{ github.actor }} + - name: Enable Pull Request Automerge + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: peter-evans/enable-pull-request-automerge@v2 + with: + token: ${{ secrets.PAT }} + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + merge-method: squash From 5bec444b92379607d8099afb8397db3d158be79b Mon Sep 17 00:00:00 2001 From: Daithi Hearn Date: Tue, 28 Feb 2023 13:56:54 +0100 Subject: [PATCH 3/3] Update latest version (5.5.0) --- package.json | 2 +- public/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0987ae8..0a351f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "5.4.8", + "version": "5.5.0", "description": "React frontend for the Cards 110", "author": "Daithi Hearn", "license": "MIT", diff --git a/public/manifest.json b/public/manifest.json index fb34480..17ac17f 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "short_name": "Cards 110", "name": "Cards 110", - "version": "5.4.8", + "version": "5.5.0", "icons": [ { "src": "./assets/favicon.png",