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(plugin): add managequickcss plugin #1357

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

castdrian
Copy link

@castdrian castdrian commented Jun 27, 2023

I've been adding a bunch of css snippets this past week and got to the point of being incredibly annoyed by the process, so here's a plugin that adds a context menu entry to messages that contain a css codeblock, and imports them according to one of three import strategies to please all the ocd patients out there, video attached

Discord_IwSBjpHP1x.mp4

@castdrian
Copy link
Author

now also supports multiple snippets per message (thanks ven)
Discord_psDbXvYaMI

@castdrian
Copy link
Author

some improvements, now the multiple import consists of nested elements, and instead of plain ol' numbers it shows a couple characters of the css as context
Discord_CW5XLHkBxc

@castdrian
Copy link
Author

and more regex fun presents, the ability to remove snippets that have been installed via the plugin, see image
uy9eXEHOz9

@castdrian castdrian changed the title feat(plugin): add importquickcss plugin feat(plugin): add managequickcss plugin Jun 28, 2023
src/plugins/importQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
@castdrian castdrian requested a review from Vendicated June 28, 2023 20:53
src/VencordNative.ts Outdated Show resolved Hide resolved
src/VencordNative.ts Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
src/plugins/manageQuickCss.tsx Outdated Show resolved Hide resolved
@castdrian castdrian requested a review from Vendicated July 14, 2023 10:41
@Vendicated
Copy link
Owner

Vendicated commented Jul 25, 2023

hmm, i tried this and it just doesn't do anything for me with no errors in the console
image

@castdrian
Copy link
Author

well that's odd, uh, maybe the regex for the css codeblocks broke, will check in a bit

@castdrian
Copy link
Author

uh, hm, cannot replicate, latest commit off of the branch works for me
image

@kingofcube
Copy link

kingofcube commented Feb 10, 2024

doesnt work...

steps to reproduce

  • put .tsx file to plugins folder
  • run pnpm build

imo i have absolutely tried nothing to fix it

the log itself

dist\patcher.js 27.6kb
dist\patcher.js.LEGAL.txt 964b
dist\patcher.js.map ✘ 180.4kb[

⚡ ERRORDone in 223ms]
No matching export in "src/components/Icons.tsx" for import "CSSFileIcon"

src/plugins/manageQuickCss.tsx:22:9:
  22 │ import { CSSFileIcon } from "@components/Icons";
     ╵          ~~~~~~~~~~~

1 error
Build failed
Build failed with 1 error:
src/plugins/manageQuickCss.tsx:22:9: ERROR: No matching export in "src/components/Icons.tsx" for import "CSSFileIcon"
✘ [ERROR] No matching export in "src/components/Icons.tsx" for import "CSSFileIcon"

src/plugins/manageQuickCss.tsx:22:9:
  22 │ import { CSSFileIcon } from "@components/Icons";
     ╵          ~~~~~~~~~~~

1 error
 ELIFECYCLE  Command failed with exit code 1.


image

@castdrian
Copy link
Author

This branch hasn’t been updated in like half a year, not surprised, main problem is neither me nor Ven ever figured out what the issue was, so it’s been kinda stuck in limbo since

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants