-
Notifications
You must be signed in to change notification settings - Fork 1
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: ajout du support de l'accordéon sur les contributions #1020
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ebff357
feat: ajout du support de l'accordéon sur les contributions
m-maillot 2511a15
fix: github action
m-maillot 9489d2d
fix: ci
m-maillot ac52fe0
fix: ci
m-maillot 9771dd5
fix: ci
m-maillot 304f750
fix: ci
m-maillot 9e538af
fix: ci
m-maillot c1e0683
fix: ci
m-maillot efbaa88
fix: ci
m-maillot 5af3294
fix: ci
m-maillot d833b91
fix: ci
m-maillot 01c434c
fix: ci
m-maillot eaa73a0
fix: ci
m-maillot 50a6a53
fix: ci
m-maillot 5db34d5
fix: ci
m-maillot 861d6f7
fix: ci
m-maillot 5d1c5dc
fix: typo
m-maillot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ docker-compose.override.yml | |
.vscode | ||
*-error.log | ||
.swc | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
apiVersion: "bitnami.com/v1alpha1" | ||
kind: "SealedSecret" | ||
metadata: | ||
annotations: &a1 | ||
sealedsecrets.bitnami.com/cluster-wide: "true" | ||
name: npm | ||
namespace: null | ||
spec: | ||
encryptedData: | ||
NPMRC: AgC5wPPiCBlsc6a+W7A1ZYeymkGxDF4365BNxxoH9If9iYy4AaGzInGLcChizK0uex2q6YHexE+4bus1k/W2/zdpuCozSA4T26X6kU4SbA7KLCH4P33JMQ0Wbic9ytNKOOIVSUZUPq5g3c6D12M+yP34blT8XYPKJPOQdQysJEJGR0hyy3OBZvsIiOoIdRe7u4lCiUE+cNf3xu13/LH5DqYHcgEphPQAFHbSCsES2HxIQCMES1f796MnoTqUT7jbmcZquX+uvmD/D+vrYnJeTOWPRTCTm7LrySPfC9x51ugxGvzckIRyQhV2UoqRzC4E3P3tTH+KIuKpURIcyegCi68ziaB3Snuzp0A7VdpGwvbFCCjBNZ1BQw9XtZ6u19TlCvAYA3Kp6ZCovuq08IEoNUHoFX7ozp/evkgnzxJUCFOjBIOWwulant/TgVs9FJ37GUbLqiLzFvq6aIcMb5W8H6HYWQdtMxk94qUfbVwpjWwsQGT/SsKYKWHS47hbchEc8cvPB66wQlxqda9a+s3N3SLqqi2K6AJDQJnbsEI2jyAZ2NsRGmlzkp6wMGRmFALEHpFReBL7Sp5p4Ajy4y71I3KqVOJ1TnPAvfDo58EIHBaJv7nfNXpBgLf3QL1+uHV/36KvBj0Z2M9coQNRjyVW5U7gVKT7+usjFuQLP+gLRjs4xSBhmaUtr0PMvWK7dKcNRa0S8rTLPZkYdcOgSR40X6g5EGYP8gCbasdjxpSgmrwRZ4g96VRJioQxxf6Y5hfBNFgyFY+HFxk3lXQDUTo+p5fZqKrt6S5treYU/Yx5PMfWRLD0FMKXCka7P1dU7akXK9jSt6QXwMS9fUH+YHR/EStL+HPaSa+25CihSJZETrqikQ31qqa0MxTr3+TpYYKfxXKQeJDB | ||
template: | ||
metadata: | ||
annotations: *a1 | ||
name: npm | ||
type: "Opaque" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
apiVersion: "bitnami.com/v1alpha1" | ||
kind: "SealedSecret" | ||
metadata: | ||
annotations: &a1 | ||
sealedsecrets.bitnami.com/cluster-wide: "true" | ||
name: npm | ||
namespace: null | ||
spec: | ||
encryptedData: | ||
NPMRC: AgC5wPPiCBlsc6a+W7A1ZYeymkGxDF4365BNxxoH9If9iYy4AaGzInGLcChizK0uex2q6YHexE+4bus1k/W2/zdpuCozSA4T26X6kU4SbA7KLCH4P33JMQ0Wbic9ytNKOOIVSUZUPq5g3c6D12M+yP34blT8XYPKJPOQdQysJEJGR0hyy3OBZvsIiOoIdRe7u4lCiUE+cNf3xu13/LH5DqYHcgEphPQAFHbSCsES2HxIQCMES1f796MnoTqUT7jbmcZquX+uvmD/D+vrYnJeTOWPRTCTm7LrySPfC9x51ugxGvzckIRyQhV2UoqRzC4E3P3tTH+KIuKpURIcyegCi68ziaB3Snuzp0A7VdpGwvbFCCjBNZ1BQw9XtZ6u19TlCvAYA3Kp6ZCovuq08IEoNUHoFX7ozp/evkgnzxJUCFOjBIOWwulant/TgVs9FJ37GUbLqiLzFvq6aIcMb5W8H6HYWQdtMxk94qUfbVwpjWwsQGT/SsKYKWHS47hbchEc8cvPB66wQlxqda9a+s3N3SLqqi2K6AJDQJnbsEI2jyAZ2NsRGmlzkp6wMGRmFALEHpFReBL7Sp5p4Ajy4y71I3KqVOJ1TnPAvfDo58EIHBaJv7nfNXpBgLf3QL1+uHV/36KvBj0Z2M9coQNRjyVW5U7gVKT7+usjFuQLP+gLRjs4xSBhmaUtr0PMvWK7dKcNRa0S8rTLPZkYdcOgSR40X6g5EGYP8gCbasdjxpSgmrwRZ4g96VRJioQxxf6Y5hfBNFgyFY+HFxk3lXQDUTo+p5fZqKrt6S5treYU/Yx5PMfWRLD0FMKXCka7P1dU7akXK9jSt6QXwMS9fUH+YHR/EStL+HPaSa+25CihSJZETrqikQ31qqa0MxTr3+TpYYKfxXKQeJDB | ||
template: | ||
metadata: | ||
annotations: *a1 | ||
name: npm | ||
type: "Opaque" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: bitnami.com/v1alpha1 | ||
kind: SealedSecret | ||
metadata: | ||
name: npm | ||
namespace: cdtn-admin | ||
spec: | ||
encryptedData: | ||
NPMRC: AgCSx7NQtX6udZAkoMiEyjs9KJK7AzFeyhJajO88Eabeqd0oGDm+aWyU4J6cwY5AzYBq5KgE5k75NgRZaWVA8sNiHJrBmx5WtCsk8Cju96XamJBCzGRRExSivj2LhwPlbMy8wVYW87E1B58s7/PxWPXdrDqhKD8Hla+S/PJlsUC0LG5gPRv9Ts7ozqm+DHHRFMqIU7GyrO1eXFd+NLYTgnckXGdAlN8wPwQxPpWJzu4DC0VNP5DdB5Bbtjb0ayxdbGcmD95sA+/wFsxevLBGMVTt84fTf5gmbc3GOEYBQo699JhpkrJGwFTabAffZA0o9LoyHbsUbkppHYiogvMUAQmFV6ufaFnUOF6Us/5g97ELWiJ0x3ZTCIq0usOyrzOjgxeHYlBDZ9/gvXzzkgUoza8TAteUWKCre7b4syB8VgFR5kAttjMoz+A74n8hr60sRIJUNBr4tDd6a+JFDcckA9BDFIEz5MaT9aBiZB35cksAyyBzHpuhBLrD1aA+ogL0N+yZFu5MXW7RFRYE+P1vEQUDhJPas7wrijPckxvkMDhOJtS3giXhMja6SlUN/3dgyzx90iMmw/VR1Gv68MZnc7qb8SzWUb10So8atXcBv4fTIHDSzPKc4L4utFfl+ScJF0Za08kTaUWCNwfUJA4NxwEAR2O05+w8aeRlmKMnm6oAjuAjjKgUJab4hTyXc4adlEWt8P9GZS0RXUqFj3aUI53Aoj3L4ILkW8Vdtgkboc0tZtE46GzYP0jR6u2o+t2c+k9M2js9gbqDcviqwgYi9fLNRoVMLt5U4Pdp+8YzbGmsJYMTwq4MHcBT5xP4CZuRMC4mEn4y4cvikfdqxt8w2mjLVDs3DegZ4eAlLxfSG9NMn3Gi3LUurE6oP0iFPJotN2ZXS07y | ||
template: | ||
metadata: | ||
name: npm | ||
namespace: cdtn-admin | ||
type: Opaque |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ import { TitleBox } from "../TitleBox"; | |
import { MenuSpecial } from "./MenuSpecial"; | ||
import { MenuStyle } from "./MenuStyle"; | ||
import { MenuTable } from "./MenuTable"; | ||
import { Details } from "@tiptap-pro/extension-details"; | ||
import { DetailsSummary } from "@tiptap-pro/extension-details-summary"; | ||
import { DetailsContent } from "@tiptap-pro/extension-details-content"; | ||
import { Placeholder } from "@tiptap/extension-placeholder"; | ||
|
||
export type EditorProps = { | ||
content?: string | null; | ||
|
@@ -36,6 +40,23 @@ export const Editor = ({ content, onUpdate, error, disabled }: EditorProps) => { | |
TableRow, | ||
TableHeader, | ||
TableCell, | ||
Details.configure({ | ||
persist: false, | ||
HTMLAttributes: { | ||
class: "details", | ||
}, | ||
}), | ||
DetailsSummary, | ||
DetailsContent, | ||
Placeholder.configure({ | ||
includeChildren: true, | ||
placeholder: ({ node }) => { | ||
if (node.type.name === "detailsSummary") { | ||
return "Titre de la section"; | ||
} | ||
return ""; | ||
}, | ||
}), | ||
], | ||
onUpdate: ({ editor }) => { | ||
const html = editor.getHTML(); | ||
|
@@ -80,17 +101,73 @@ export const Editor = ({ content, onUpdate, error, disabled }: EditorProps) => { | |
|
||
const StyledEditorContent = styled(EditorContent)` | ||
padding: 0 12px; | ||
|
||
.ProseMirror:focus { | ||
outline: none; | ||
} | ||
|
||
table { | ||
th { | ||
background-color: #f3f3f3; | ||
min-width: 100px; | ||
} | ||
|
||
td { | ||
border: 1px solid black; | ||
text-align: center; | ||
} | ||
} | ||
|
||
.ProseMirror { | ||
> * + * { | ||
margin-top: 0.75em; | ||
} | ||
|
||
.is-empty::before { | ||
content: attr(data-placeholder); | ||
float: left; | ||
color: #adb5bd; | ||
pointer-events: none; | ||
height: 0; | ||
} | ||
|
||
.details { | ||
display: flex; | ||
margin: 1rem 0; | ||
border: 0; | ||
padding: 0.5rem; | ||
|
||
> button { | ||
display: flex; | ||
cursor: pointer; | ||
background: transparent; | ||
border: none; | ||
padding: 0; | ||
|
||
&::before { | ||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGFyaWEtaGlkZGVuPSJ0cnVlIiBjbGFzcz0ic2MtaW1XWUFJIGpFTHpJTCI+PHBvbHlsaW5lIHBvaW50cz0iOSAxOCAxNSAxMiA5IDYiIHN0cm9rZT0iIzZmOGFjOSI+PC9wb2x5bGluZT48L3N2Zz4="); | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
color: #6f8ac9; | ||
font-weight: bold; | ||
width: 2.5em; | ||
height: 2em; | ||
} | ||
} | ||
|
||
&.is-open > button::before { | ||
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGFyaWEtaGlkZGVuPSJ0cnVlIiBjbGFzcz0ic2MtaW1XWUFJIGpFTHpJTCI+PHBvbHlsaW5lIHBvaW50cz0iOSAxOCAxNSAxMiA5IDYiIHN0cm9rZT0iIzZmOGFjOSI+PC9wb2x5bGluZT48L3N2Zz4="); | ||
transform: rotate(90deg); | ||
} | ||
|
||
> div { | ||
flex: 1 1 auto; | ||
} | ||
|
||
:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} | ||
Comment on lines
+121
to
+172
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On va avoir des conflits ici ^^ |
||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌