docus icon indicating copy to clipboard operation
docus copied to clipboard

Code Group not working in production

Open YesidMarin opened this issue 2 years ago • 9 comments

Hello,

I have this component in local but when I release it in prod it doesn't work. I can't copy the code and it's not formatted.

image Screenshot 2023-09-03 at 21 44 07

YesidMarin avatar Sep 04 '23 02:09 YesidMarin

I seem to have the same problem and it doesn't work in the development environment

MangMax avatar Sep 04 '23 05:09 MangMax

Happened to me as well with version v1.14.6, ended up rolling back a couple of versions.

collinped avatar Sep 08 '23 23:09 collinped

Yup, it happens to me as well. It doesn't work in dev and in prod.

@collinped , could you tell me which version did you use to get it work again ? I tried few roll backs and I can't make it work again ^^'

arkhaiel avatar Sep 10 '23 19:09 arkhaiel

@mathieunicolas I rolled back to 1.14.3

collinped avatar Sep 11 '23 15:09 collinped

@mathieunicolas I rolled back to 1.14.3

Thanks for your answer. I tried with 1.14.3 and I still have the bad behaviour, I don't understand where it comes from.

  "devDependencies": {
    "@nuxt-themes/docus": "1.14.3",
    "@nuxt/devtools": "^0.8.3",
    "nuxt": "^3.7.1",
    "rehype-katex": "^6.0.3",
    "remark-math": "^5.1.1"
  },

I deleted the node_modules and .nuxt folders, and... same problem in all my code-group components. What's wrong ? My nuxt version ?

Anyway, quick and dirty fix by adding a global CSS rule that seems to work :

code > span {
    display: block;
}

edit: less dirty fix :

code > span {
    white-space: pre-wrap;
}

arkhaiel avatar Sep 14 '23 17:09 arkhaiel

seems related to https://www.npmjs.com/package/@nuxt-themes/elements but the repo is not opened. 🥲

Barbapapazes avatar Sep 16 '23 16:09 Barbapapazes

alert components are broken too ? below the output for the following code :

::alert{type="info"}
Lorsque l'on affecte une valeur à une variable, il faut toujours penser au type que l'on va créer.

Par exemple, l'expression `var = 42` va créer un **entier** égal à 42. En revanche, l'expression `var = "42"` va créer une **chaîne de caractères** composée des caractères `4` et `2`.

Les fonctions `int()` et `str()` permettent de modifier le type d'une variable.
::

image

@Atinux do you have any clue for this bug ?

arkhaiel avatar Sep 17 '23 14:09 arkhaiel

I am sorry about this, we are in the migration to remove all sub dependencies in order to migrate to pure TailwindCSS.

I know @bdrtsky is working on it, what is the ETA?

atinux avatar Sep 18 '23 11:09 atinux

I am sorry about this, we are in the migration to remove all sub dependencies in order to migrate to pure TailwindCSS.

I know @bdrtsky is working on it, what is the ETA?

Thanks for answering, and don't be sorry !! You're doing an amazing work and huge thanks for that ! Is moving docus to tailwind in the list as well ? I was starting to think a docus remake with tailwind could be useful, and then I've seen things for Docus v2, is there a milestone somewhere if we want to help ?

arkhaiel avatar Sep 18 '23 12:09 arkhaiel