Skip to content

Commit 9b6d430

Browse files
authored
Merge pull request #240 from medyo/develop
New version #Minor
2 parents 3220e0b + 5f5215c commit 9b6d430

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2298
-515
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
name: Deploy Web Version to hackertab.dev
2-
1+
name: '✅ [PROD] Deploy main to web environment'
32
on:
43
workflow_dispatch:
5-
push:
6-
branches:
7-
- feat/cp-build
4+
85
env:
96
VITE_BUILD_TARGET: 'web'
107
VITE_AMPLITUDE_KEY: ${{ secrets.REACT_APP_AMPLITUDE_KEY }}
118
VITE_AMPLITUDE_URL: ${{ secrets.REACT_APP_AMPLITUDE_URL }}
129
VITE_API_URL: ${{ secrets.API_URL }}
1310
VITE_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
11+
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
12+
VITE_SENTRY_TOKEN: ${{ secrets.VITE_SENTRY_TOKEN }}
1413

1514
jobs:
1615
build_and_deploy:
@@ -39,3 +38,4 @@ jobs:
3938
key: ${{ secrets.DEPLOY_SSH_KEY }}
4039
source: 'dist/'
4140
target: '~/hackertab.dev'
41+
rm: true

.github/workflows/develop.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Develop branch to the web version
1+
name: '👨‍💻 [DEV] Deploy develop to web environment'
22
on:
33
workflow_dispatch:
44

@@ -8,6 +8,8 @@ env:
88
VITE_AMPLITUDE_URL: ${{ secrets.REACT_APP_AMPLITUDE_URL }}
99
VITE_API_URL: ${{ secrets.API_URL }}
1010
VITE_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
11+
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
12+
VITE_SENTRY_TOKEN: ${{ secrets.VITE_SENTRY_TOKEN }}
1113

1214
jobs:
1315
build_and_deploy:
@@ -38,3 +40,4 @@ jobs:
3840
key: ${{ secrets.DEPLOY_SSH_KEY }}
3941
source: 'dist/'
4042
target: '~/hackertab.dev-develop'
43+
rm: true

.github/workflows/distribute.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ env:
2828
VITE_AMPLITUDE_URL: ${{ secrets.REACT_APP_AMPLITUDE_URL }}
2929
VITE_API_URL: ${{ secrets.API_URL }}
3030
VITE_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
31+
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
32+
VITE_SENTRY_TOKEN: ${{ secrets.VITE_SENTRY_TOKEN }}
3133

3234
jobs:
3335
tag_version:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Please do not hesitate to ask a question, report a bug or add a suggestion. or s
5757

5858
## Development
5959

60-
Please use the develop branch. Create an .env file with the necessary
60+
Please use the develop branch. Create an .env file with the necessary env variables
6161

6262
```bash
6363
$ git clone --branch develop git@github.com:medyo/hackertab.dev.git

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": false,
55
"dependencies": {
66
"@amplitude/analytics-browser": "^1.5.5",
7+
"@sentry/react": "^9.38.0",
78
"@tanstack/query-async-storage-persister": "^5.8.3",
89
"@tanstack/react-query": "^4.13.0",
910
"@tanstack/react-query-persist-client": "^5.8.4",
@@ -22,6 +23,7 @@
2223
"react-easy-sort": "^1.5.1",
2324
"react-error-boundary": "^3.1.4",
2425
"react-icons": "^5.2.1",
26+
"react-infinite-scroll-hook": "^6.0.0",
2527
"react-markdown": "^7.0.1",
2628
"react-modal": "^3.12.1",
2729
"react-responsive": "^10.0.1",
@@ -35,7 +37,7 @@
3537
"react-tooltip": "^4.2.21",
3638
"timeago.js": "^4.0.2",
3739
"type-fest": "^1.2.0",
38-
"vite-plugin-ejs": "^1.6.4",
40+
"vite-plugin-ejs": "^1.7.0",
3941
"zustand": "^5.0.3"
4042
},
4143
"engines": {
@@ -64,6 +66,7 @@
6466
"react-error-overlay": "6.0.9"
6567
},
6668
"devDependencies": {
69+
"@sentry/vite-plugin": "^3.5.0",
6770
"@types/chrome": "^0.0.241",
6871
"@types/dompurify": "^2.3.4",
6972
"@types/jest": "^29.1.2",
@@ -90,7 +93,7 @@
9093
"prettier": "^2.7.1",
9194
"terser": "^5.19.2",
9295
"typescript": "^5.1.6",
93-
"vite": "^6.2.4",
96+
"vite": "^6.2.7",
9497
"vite-plugin-svgr": "^4.3.0",
9598
"vite-tsconfig-paths": "^4.2.0"
9699
}
Lines changed: 13 additions & 0 deletions
Loading

src/App.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import clsx from 'clsx'
12
import { useEffect, useLayoutEffect, useState } from 'react'
23
import { DNDLayout } from 'src/components/Layout'
34
import {
@@ -30,6 +31,7 @@ export const App = () => {
3031
maxVisibleCards,
3132
setAdvStatus,
3233
isDNDModeActive,
34+
layout,
3335
DNDDuration,
3436
setDNDDuration,
3537
} = useUserPreferences()
@@ -80,7 +82,11 @@ export const App = () => {
8082
<OnboardingModal showOnboarding={showOnboarding} setShowOnboarding={setShowOnboarding} />
8183
)}
8284

83-
<div className="layoutLayers hideScrollBar">
85+
<div
86+
className={clsx(
87+
'layoutLayers hideScrollBar',
88+
layout === 'cards' ? 'cardsLayout' : 'gridLayout'
89+
)}>
8490
{isDNDModeActive() && <DNDLayout />}
8591
<AppContentLayout />
8692
</div>

src/assets/App.css

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,13 @@ a {
411411
}
412412
.rowCover {
413413
border-radius: 4px;
414-
display: block;
414+
display: flex;
415+
align-items: center;
416+
justify-content: center;
415417
width: 100%;
416418
min-height: auto;
417419
object-fit: cover;
420+
418421
aspect-ratio: 16/9;
419422
background-color: var(--placeholder-background-color);
420423
margin-bottom: 12px;
@@ -492,6 +495,11 @@ a {
492495
font-size: 12px;
493496
}
494497

498+
.rowDetails .rowItem.verticalAligned {
499+
display: inline-flex;
500+
align-items: center;
501+
gap: 4px;
502+
}
495503
.rowDescription .rowItem {
496504
font-size: 12px;
497505
}
@@ -1235,11 +1243,16 @@ Producthunt item
12351243
justify-content: center;
12361244
}
12371245

1238-
.layoutLayers {
1246+
.layoutLayers.cardsLayout {
12391247
margin-left: 1%;
12401248
margin-right: 1%;
12411249
}
12421250

1251+
.layoutLayers.gridLayout {
1252+
margin-top: 1%;
1253+
box-shadow: 0px -10px 20px -15px var(--card-border-color);
1254+
}
1255+
12431256
.Cards {
12441257
padding-bottom: 20px;
12451258
}
@@ -1504,3 +1517,12 @@ Modal
15041517
width: auto;
15051518
}
15061519
}
1520+
1521+
.mobileOnly {
1522+
display: none;
1523+
}
1524+
@media (max-width: 768px) {
1525+
.mobileOnly {
1526+
display: block;
1527+
}
1528+
}

src/components/Elements/Card/Card.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ export const Card = ({
7575
{badge && <span className="blockHeaderBadge">{badge}</span>}
7676
</div>
7777

78-
{canAdsLoad && adsConfig.enabled && withAds && <AdvBanner />}
78+
{canAdsLoad && adsConfig.enabled && withAds && (
79+
<div className="ad-wrapper blockRow">
80+
<AdvBanner />
81+
</div>
82+
)}
7983

8084
<div className="blockContent scrollable">{children}</div>
8185
</div>
Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
1-
import { useState } from 'react'
2-
import { DesktopBreakpoint } from 'src/providers/DesktopBreakpoint'
3-
import { MobileBreakpoint } from 'src/providers/MobileBreakpoint'
41
import { useUserPreferences } from 'src/stores/preferences'
5-
import { BottomNavigation } from '../Elements'
6-
import { DesktopCards } from './DesktopCards'
7-
import { MobileCards } from './MobileCards'
8-
import { ScrollCardsNavigator } from './ScrollCardsNavigator'
2+
import { lazyImport } from 'src/utils/lazyImport'
3+
const { Feed } = lazyImport(() => import('src/features/feed'), 'Feed')
4+
const { CardsLayout } = lazyImport(() => import('./CardsLayout'), 'CardsLayout')
95

106
export const AppContentLayout = () => {
11-
const { cards, userCustomCards } = useUserPreferences()
12-
const [selectedCard, setSelectedCard] = useState(cards[0])
13-
7+
const { layout } = useUserPreferences()
148
return (
159
<>
16-
<main className="AppContent">
17-
<ScrollCardsNavigator />
18-
<DesktopBreakpoint>
19-
<DesktopCards cards={cards} userCustomCards={userCustomCards} />
20-
</DesktopBreakpoint>
21-
<MobileBreakpoint>
22-
<div className="Cards HorizontalScroll">
23-
<MobileCards selectedCard={selectedCard} />
24-
</div>
25-
</MobileBreakpoint>
26-
</main>
27-
<BottomNavigation selectedCard={selectedCard} setSelectedCard={setSelectedCard} />
10+
<main className="AppContent">{layout === 'grid' ? <Feed /> : <CardsLayout />}</main>
2811
</>
2912
)
3013
}

0 commit comments

Comments
 (0)