Skip to content

Commit 08775f8

Browse files
Feat/layout updates (#1324)
* feat(sidebar): add collapsible sidebar with smooth animation - Add SidebarContext for managing collapsed state - Create MinimalHeader with hamburger toggle aligned to sidebar icons - Implement AppSidebar component with navigation items - Update sidebar-layout with animated width transitions and clipping - Adjust sidebar padding to p-3 and hover containment with max-w-9 - Add pink accent for current page indicator * feat(layout): integrate collapsible sidebar into app layout * feat(config): add sidebar navigation items and social link * refactor(pages): update feed, home, and articles layout styling * feat(settings): update settings page styling * refactor(theme): simplify theme provider and remove unused nav code * refactor(ui): update link component and trending posts loading styles * chore(assets): add LinkedIn icon and Codú logo * chore(deps): add new script for sources * chore(db): update migration and add seed sources script * refactor(ui): add aria-labels and update layout components - Add aria-label to header elements for accessibility - Update sidebar and navbar layout components - Refactor editor navigation styling - Minor layout adjustments across page components * fix(e2e): update test expectations to match current UI - Update home test to check for "Trending" heading instead of h1 - Update login test button text to match OAuth buttons - Fix articles test to use Create button and correct modal text - Add loading state wait and exact matching in my-posts test - Remove flaky footer Events link check * feat(api): add getUserLinkBySlug endpoint and fix myScheduled query - Add getUserLinkBySlug endpoint for fetching user link posts by slug - Fix myScheduled to filter by status="scheduled" instead of "published" - Remove unused gt import from drizzle-orm * feat(editor): add new PostEditor component and E2E test infrastructure - Add PostEditor with WriteTab and LinkTab for article/link creation - Add URL metadata fetching for link posts - Add article toolbar with formatting options - Add E2E editor tests and test utilities - Update E2E setup with link post test data - Update slash command and image upload extensions * feat: add link post support and UI improvements - Add user link detail page and fetch-metadata API route - Add NewsletterCTA component - Update draft preview page with improved layout - Update feed, articles, and homepage clients - Improve header, sidebar, and content layout components - Update comments area and unified content card - Minor fixes to Search, listbox, and fallback media components * chore: misc updates and cleanup - Update auth.ts and next-auth types - Add SidebarContext for collapsible sidebar state - Add drizzle seed-sources script - Update comment router and posts lib - Update markdoc editor shortcuts and example tags - Remove unused CoduChallenge component * feat(e2e): enhance publish flow tests with improved wait conditions and selectors * style: standardize formatting and clean up whitespace across multiple files * feat(editor): enhance CreateContent component with improved data handling and state management
1 parent 8dfe296 commit 08775f8

File tree

85 files changed

+6831
-1230
lines changed

Some content is hidden

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

85 files changed

+6831
-1230
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Node.js
2828
uses: actions/setup-node@v4
2929
with:
30-
node-version-file: '.nvmrc'
30+
node-version-file: ".nvmrc"
3131
cache: "npm"
3232

3333
- name: Install dependencies
@@ -55,7 +55,7 @@ jobs:
5555
- name: Setup Node.js
5656
uses: actions/setup-node@v4
5757
with:
58-
node-version-file: '.nvmrc'
58+
node-version-file: ".nvmrc"
5959
cache: "npm"
6060

6161
- name: Cache Playwright browsers

.github/workflows/greetings.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Welcome New Contributors'
1+
name: "Welcome New Contributors"
22

33
on:
44
issues:
@@ -17,9 +17,9 @@ jobs:
1717
issues: write
1818
pull-requests: write
1919
steps:
20-
- name: 'Greet the contributor'
20+
- name: "Greet the contributor"
2121
uses: garg3133/[email protected]
2222
with:
2323
token: ${{ secrets.GITHUB_TOKEN }}
24-
issue-message: 'Hello @contributor_name, thanks for opening your first issue! Your contribution is valuable to us. The maintainers will review this issue and provide feedback as soon as possible.'
25-
pr-message: 'Hello @contributor_name, thanks for opening your first Pull Request. The maintainers will review this Pull Request and provide feedback as soon as possible. Keep up the great work!'
24+
issue-message: "Hello @contributor_name, thanks for opening your first issue! Your contribution is valuable to us. The maintainers will review this issue and provide feedback as soon as possible."
25+
pr-message: "Hello @contributor_name, thanks for opening your first Pull Request. The maintainers will review this Pull Request and provide feedback as soon as possible. Keep up the great work!"

.github/workflows/pull-request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- name: Use Node.js
2020
uses: actions/setup-node@v4
2121
with:
22-
node-version-file: '.nvmrc'
23-
cache: 'npm'
22+
node-version-file: ".nvmrc"
23+
cache: "npm"
2424

2525
- name: Install dependencies
2626
run: npm ci

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ For e2e tests we are using playwright
120120

121121
After making changes make sure that tests passes
122122

123-
To create a e2e test make a file in `/e2e` directory
123+
To create a e2e test make a file in `/e2e` directory
124124

125125
**1.** Start the codu application by typing this command:
126126

@@ -136,7 +136,6 @@ yarn test:e2e
136136

137137
Read Playwright [documentation](https://playwright.dev/)
138138

139-
140139
---
141140

142141
## Style Guide for Git Commit Messages :memo:

EDITOR_SHORTCUTS.MD

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,49 @@ This guide provides an overview of the available hotkeys and shortcuts for the c
44

55
## Hotkeys
66

7-
| Hotkey | Description |
8-
|-----------------|------------------------------|
9-
| `Tab` | Trigger shortcuts (see below)|
10-
| `Backspace` | Select Previous word |
11-
| `Meta+(1-6)` | Heading 1 - 6 |
12-
| `Meta+b` | Bold |
13-
| `Meta+i` | Italic |
14-
| `Meta+shift+b` | Bold & Italic |
15-
| `Meta+s` | Code Snippet |
16-
| `Meta+shift+c` | Code Block |
17-
| `Meta+Shift+.` | Block Quote |
18-
| `Meta+u` | URL |
19-
| `Meta+l` | Link |
20-
| `Meta+Shift+i` | Image |
7+
| Hotkey | Description |
8+
| -------------- | ----------------------------- |
9+
| `Tab` | Trigger shortcuts (see below) |
10+
| `Backspace` | Select Previous word |
11+
| `Meta+(1-6)` | Heading 1 - 6 |
12+
| `Meta+b` | Bold |
13+
| `Meta+i` | Italic |
14+
| `Meta+shift+b` | Bold & Italic |
15+
| `Meta+s` | Code Snippet |
16+
| `Meta+shift+c` | Code Block |
17+
| `Meta+Shift+.` | Block Quote |
18+
| `Meta+u` | URL |
19+
| `Meta+l` | Link |
20+
| `Meta+Shift+i` | Image |
2121

2222
## How to Use Hotkeys
2323

2424
1. Press the meta key (windows key or mac cmd key) with the desired hotkey eg, cmd+1 to render #
2525
2. You can also highlight the word and then use the hotkey combination and for this you can double click the word or phrase or press meta+backspace a few times to highlight the required selection of text.
2626
3. For Links and images, select the text and then use the hotkey combination. You will be prompted for the url.
2727

28-
2928
## Markdown Shortcuts
3029

31-
| Shortcut | Description | Example |
32-
|----------|----------------------------------------|-------------------------------|
33-
| `/link` | Create a link with text and URL | `[text](url)` |
34-
| `/image` | Insert an image with alt text and URL | `![text](url)` |
30+
| Shortcut | Description | Example |
31+
| -------- | ------------------------------------- | -------------- |
32+
| `/link` | Create a link with text and URL | `[text](url)` |
33+
| `/image` | Insert an image with alt text and URL | `![text](url)` |
3534

3635
## Custom Tag Shortcuts
3736

38-
| Shortcut | Description | Example |
39-
|---------------|------------------------------------|-------------------------------|
40-
| `/media` | Embed a media file with src | `{% media src="url" /%}` |
41-
| `/youtube` | Embed a YouTube video with src | `{% youtube src="url" /%}` |
42-
| `/codepen` | Embed a CodePen project with src | `{% codepen src="url" /%}` |
43-
| `/codesandbox`| Embed a CodeSandbox project with src | `{% codesandbox src="url" /%}`|
37+
| Shortcut | Description | Example |
38+
| -------------- | ------------------------------------ | ------------------------------ |
39+
| `/media` | Embed a media file with src | `{% media src="url" /%}` |
40+
| `/youtube` | Embed a YouTube video with src | `{% youtube src="url" /%}` |
41+
| `/codepen` | Embed a CodePen project with src | `{% codepen src="url" /%}` |
42+
| `/codesandbox` | Embed a CodeSandbox project with src | `{% codesandbox src="url" /%}` |
4443

4544
## How to Use Shortcuts
4645

4746
1. Place the cursor where you want to insert the content.
4847
2. Type the shortcut (e.g., `/link`).
4948
3. Press the `Tab` key.
5049
4. For Markdown shortcuts `/link` and `/image`, you'll be prompted to enter the text and URL.
51-
5. For custom tag shortcuts, you'll be prompted to enter the URL for the `src` attribute.
50+
5. For custom tag shortcuts, you'll be prompted to enter the URL for the `src` attribute.
5251

5352
The editor will automatically replace the shortcut with the corresponding content.

0 commit comments

Comments
 (0)