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

refactor(ui) & feat(blockly): Rework UI and add dynamic inputs #34

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c858cf9
feat: Dynamic inputs
ItsLimeNade Apr 20, 2024
717e9b2
Merge pull request #22 from scratch-for-discord/master
ItsLimeNade Apr 20, 2024
2d835e6
Fix: math category errors
ItsLimeNade Apr 20, 2024
fba3cf2
Merge branch 'dynamic-inputs' into merge
ItsLimeNade Apr 20, 2024
db6a561
Merge pull request #23 from scratch-for-discord/merge
ItsLimeNade Apr 20, 2024
da86697
Fix: Merge conflicts crumbs
ItsLimeNade Apr 20, 2024
4fdb7c2
Fix: import bug
ItsLimeNade Apr 20, 2024
218930a
Chore: Lint
ItsLimeNade Apr 20, 2024
06bb44d
Feat: Removed AsMu V1 -> V2
ItsLimeNade Apr 20, 2024
5517252
Feat: Better Tooltips + Remove logs
ItsLimeNade Apr 21, 2024
7d48e51
Feat: update workspace creation form
ItsLimeNade Apr 21, 2024
a1100a0
Uhm, not gonnna ask questions
ItsLimeNade Jul 8, 2024
8ce3906
Init: Ui refactor
retrouser955 Jul 29, 2024
4c557cc
now using shadcn-svelte + editor redesign (#32)
lea0o0oo Aug 20, 2024
e335428
init: workspace UI
retrouser955 Aug 20, 2024
641d06d
Merge branches 'dynamic-inputs' and 'dynamic-inputs' of https://githu…
retrouser955 Aug 20, 2024
17be696
Add varela font
retrouser955 Aug 20, 2024
265dc73
revert back to @lea0o0oo csr
retrouser955 Aug 20, 2024
f8ece80
fix: interface not rendering sometimes
retrouser955 Aug 20, 2024
d48f711
fix merge conflicts
retrouser955 Aug 20, 2024
06dd03a
fix more merge conflicts
retrouser955 Aug 20, 2024
360439a
attempt to fix workspace ui
retrouser955 Aug 21, 2024
3fcd1c7
Dynamic inputs revert (#35)
retrouser955 Aug 22, 2024
5c00325
chore: cleanup types
retrouser955 Aug 22, 2024
714cf13
fix: gh actions
retrouser955 Aug 22, 2024
e65b62e
Fix: navbar not showing on initial page load
retrouser955 Aug 22, 2024
8e08dda
init: user workspaces
retrouser955 Aug 22, 2024
3407ff9
Update navbar to use $page store instead
retrouser955 Aug 22, 2024
e6bfbba
Implement hide navbar feature
retrouser955 Aug 22, 2024
c87be8c
fix different sizes on viewports
retrouser955 Aug 22, 2024
2e9d00f
moved Collapse btn to left
Aug 22, 2024
8cb4403
Hidden overflow-x in warnings modal, so that when expanding the accor…
Aug 22, 2024
c26732c
make animation smoother
retrouser955 Aug 22, 2024
d6ccef5
init: new interface
retrouser955 Aug 23, 2024
e96407c
Make ui responsive on mobile devices
retrouser955 Aug 23, 2024
4fdd978
init: workspace ui
retrouser955 Aug 24, 2024
a3031c8
Bootstrap workspace creation
retrouser955 Aug 24, 2024
2bba814
make localstorage react to changes
retrouser955 Aug 24, 2024
2718e82
get edit and delete buttons working
retrouser955 Aug 25, 2024
fe574c1
implement load on open workspace
retrouser955 Aug 25, 2024
2905367
init: cryptography
retrouser955 Aug 25, 2024
aa3bad7
init: account tab
Aug 27, 2024
29378dd
fix: merge conflicts
Aug 27, 2024
5f558a6
add blockshape value
Aug 27, 2024
65de2cb
chore(lint): run eslint and prettier
Aug 27, 2024
a6e8b03
Make pull request tests stricter
retrouser955 Aug 27, 2024
7688723
feat(workflow): verbose pull request workflow
Aug 27, 2024
1094f09
merge
Aug 27, 2024
0a5d1c4
chore(format): run prettier
Aug 27, 2024
4b79aa2
chore(lint): fix eslint errors
Aug 27, 2024
0d73380
stop prettier from annoying us
Aug 27, 2024
f8f8a75
chore(lint & format): make eslint and prettier work together
Aug 27, 2024
652a052
feat(editor nav): make dropdown
retrouser955 Aug 31, 2024
d47e63e
refactor(EditorNavbar): Put file commands in dropdown instead
retrouser955 Sep 22, 2024
46a0ac7
feat(editor nav): toolbox
retrouser955 Sep 22, 2024
c2024df
chore(format & lint): Ran formatting scripts
retrouser955 Sep 23, 2024
db7182c
better login pages, 404 page (#66)
noxyyk Sep 28, 2024
c227aba
fix(spacing) & chore(lint)
retrouser955 Sep 28, 2024
5991304
sort out layouts
retrouser955 Sep 28, 2024
e4d507d
chore(fmt)
retrouser955 Sep 28, 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
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ node_modules
pnpm-lock.yaml
package-lock.json
yarn.lock

# Ignore the shadcn components
src/lib/components/ui
20 changes: 10 additions & 10 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ module.exports = {
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended",
"prettier"
"prettier",
],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
parserOptions: {
sourceType: "module",
ecmaVersion: 2020,
extraFileExtensions: [".svelte"]
extraFileExtensions: [".svelte"],
},
env: {
browser: true,
es2017: true,
node: true
node: true,
},
overrides: [
{
files: ["*.svelte"],
parser: "svelte-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser"
}
}
parser: "@typescript-eslint/parser",
},
},
],
rules: {
semi: [1, "always"],
quotes: [1, "double", "avoid-escape"],
curly: [1, "multi-line"],
"space-before-function-paren": [2, "never"],
"space-before-function-paren": "off",
"@typescript-eslint/semi": [1, "always"],
"@typescript-eslint/quotes": [1, "double", "avoid-escape"],
"@typescript-eslint/space-before-function-paren": [2, "never"],
"@typescript-eslint/space-before-function-paren": "off",
"no-use-before-define": 0,
"no-unused-vars": 0,
"@typescript-eslint/no-use-before-define": 2,
Expand All @@ -47,6 +47,6 @@ module.exports = {
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-unsafe-argument": 0,
"spaced-comment": 0,
"eol-last": ["error", "always"]
}
"eol-last": ["error", "always"],
},
};
16 changes: 8 additions & 8 deletions .github/workflows/pr-block-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest

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

- name: Display block rules
run: |
RULES=$(cat ./block_creation_rules.md)
gh pr comment ${{ github.event.pull_request.number }} --body "$RULES"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Display block rules
run: |
RULES=$(cat ./block_creation_rules.md)
gh pr comment ${{ github.event.pull_request.number }} --body "$RULES"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 18 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,28 @@ on:

jobs:
lint:
name: Run eslint
name: Run ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v4

- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: 20
- run: yarn
- run: yarn lint --fix

- name: Install PNPM
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Check Prettier format
run: pnpm format:check

- name: Run ESLint
run: pnpm lint:noformat
# tests are not testing 😭
# test:
# name: Run test
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"useTabs": true,
"singleQuote": false,
"trailingComma": "none",
"trailingComma": "es5",
"printWidth": 100,
"semi": true,
"plugins": ["prettier-plugin-svelte"],
"plugins": ["prettier-plugin-svelte", "eslint-plugin-prettier"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
6 changes: 5 additions & 1 deletion block_creation_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@ Before merging, please ensure that each modified or newly created block meets th
**Concise List:**

##### 1. The block does one thing.

- For example, the `create_embed` block should only create an embed and not create a variable.

##### 2. The block has warnings for crucial inputs.

- For example, in the `get_user_by_id` block, the `id` field must include a warning, as it is crucial for the block to function as intended.

##### 3. Each block has maximum customizability.

##### 4. Inputs are error-proofed.

- **DO NOT CREATE INPUTS WHERE YOU CAN TYPE CODE** (with the exception of the insert JS block).
- Inputs should not cause errors, even when left empty.

##### 5. Consistent design patterns.

- Every block should be created in the same style.

##### 6. Clear and descriptive titles.

##### 7. Block modularity and reusability.

- Ensure that blocks can connect with each other in various scenarios. For example, if two blocks have the `user` type, they should be usable in all user inputs.

##### 8. Performance.

##### 9. Consider user feedback.

These rules will make app development easier, help eliminate pesky bugs, and simplify refactoring.

14 changes: 14 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://shadcn-svelte.com/schema.json",
"style": "default",
"tailwind": {
"config": "tailwind.config.js",
"css": "src/app.pcss",
"baseColor": "neutral"
},
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils"
},
"typescript": true
}
10 changes: 5 additions & 5 deletions docs/blocks/BlockCreation.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ const blocks: BlockDefinition[] = [
helpUrl: "https://wiki.discodes.xyz/",
code: (args) => {
return `console.log("Hello World")`;
}
}
},
},
];
```

Expand Down Expand Up @@ -185,7 +185,7 @@ import TextInput from "$lib/utils/BlockGen/Inputs/TextInput";

const blocks: BlockDefinition[] = {
// All the properties
args: [new TextInput("TEXT", "Hello World")]
args: [new TextInput("TEXT", "Hello World")],
};
```

Expand Down Expand Up @@ -228,8 +228,8 @@ const blocks: BlockDefinition[] = [
inline: true,
colour: "#5ba58c",
tooltip: "This block prints Hello World.",
helpUrl: "https://wiki.discodes.xyz/"
}
helpUrl: "https://wiki.discodes.xyz/",
},
];
```

Expand Down
Loading
Loading