Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Batching the PRs (#1319)

Matt Robertsb116fce88ecd
diff --git a/locale/ar/client.json b/locale/ar/client.json
index b3132392c..d41dc7a85 100644
--- a/locale/ar/client.json
+++ b/locale/ar/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "لا تملك الصلاحيات لتصفح هذه الصفحة.",
"error.unauthorized.title": "غير مخول",
"home.filter.label": "فلتر",
+ "home.filter.search.label": "Search in filters",
"home.form.defaultinvitation": "أدخل اقتراحك هنا...",
"home.form.defaultwelcomemessage": "يسعدنا سماع أفكارك.\n\nكيف يمكننا أن نكون أفضل؟ هذا هو المكان المناسب للتصويت والمناقشة ومشاركة الأفكار.",
"home.lonely.suggestion": "ننصح بإنشاء <0>٣ اقتراحات على الأقل</0> قبل مشاركة هذا الموقع. المحتوى المبدئي مهم لجذب جمهورك.",
diff --git a/locale/cs/client.json b/locale/cs/client.json
index bfff33bb9..61e864943 100644
--- a/locale/cs/client.json
+++ b/locale/cs/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "You are not authorized to view this page.",
"error.unauthorized.title": "Not Authorized",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Enter your suggestion here...",
"home.form.defaultwelcomemessage": "We'd love to hear what you're thinking about.\n\nWhat can we do better? This is the place for you to vote, discuss and share ideas.",
"home.lonely.suggestion": "It's recommended that you create <0>at least 3</0> suggestions here before sharing this site. The initial content is important to start engaging your audience.",
diff --git a/locale/de/client.json b/locale/de/client.json
index 85dcbe897..69d66c309 100644
--- a/locale/de/client.json
+++ b/locale/de/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Du bist nicht berechtigt, diese Seite anzuschauen.",
"error.unauthorized.title": "Nicht berechtigt",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Filter durchsuchen...",
"home.form.defaultinvitation": "Gib hier Deinen Vorschlag ein...",
"home.form.defaultwelcomemessage": "Wir würden gerne erfahren, worüber Du nachdenkst.\n\nWas können wir verbessern? Hier kannst Du abstimmen, diskutieren und neue Ideen vorschlagen.",
"home.lonely.suggestion": "Es wird empfohlen, dass du <0>mindestens 3</0> Vorschläge hier erstellst, bevor du diese Seite teilst. Der anfängliche Inhalt ist wichtig, um die Interaktion mit deiner Zielgruppe zu fördern.",
diff --git a/locale/el/client.json b/locale/el/client.json
index 86a3e0794..dea29561e 100644
--- a/locale/el/client.json
+++ b/locale/el/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Δεν έχετε δικαίωμα πρόσβασης σε αυτή τη σελίδα.",
"error.unauthorized.title": "Χωρίς Εξουσιοδότηση",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Εισάγετε εδώ την πρότασή σας...",
"home.form.defaultwelcomemessage": "Θα θέλαμε πολύ να ακούσουμε τι σκέφτεστε.\n\nΤι μπορούμε να κάνουμε καλύτερα; Αυτό είναι το μέρος για να ψηφίσετε, να συζητήσετε και να μοιραστείτε ιδέες.",
"home.lonely.suggestion": "Συνιστάται να δημιουργείσετε εδώ <0>τουλάχιστον 3</0> προτάσεις πριν από την κοινή χρήση αυτής της ιστοσελίδας. Το αρχικό περιεχόμενο είναι σημαντικό να αρχίσετε να προσελκύετε το κοινό σας.",
diff --git a/locale/en/client.json b/locale/en/client.json
index f35966163..6b9aee5f3 100644
--- a/locale/en/client.json
+++ b/locale/en/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "You are not authorized to view this page.",
"error.unauthorized.title": "Not Authorized",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Enter your suggestion here...",
"home.form.defaultwelcomemessage": "We'd love to hear what you're thinking about.\n\nWhat can we do better? This is the place for you to vote, discuss and share ideas.",
"home.lonely.suggestion": "It's recommended that you create <0>at least 3</0> suggestions here before sharing this site. The initial content is important to start engaging your audience.",
diff --git a/locale/es-ES/client.json b/locale/es-ES/client.json
index ed6967140..bab903310 100644
--- a/locale/es-ES/client.json
+++ b/locale/es-ES/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "No estás autorizado para ver esta página.",
"error.unauthorized.title": "No está autorizado",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Escriba aquí su sugerencia...",
"home.form.defaultwelcomemessage": "Nos encantaría escuchar lo que estás pensando.\n\n¿Qué podemos hacer mejor? Este es el lugar para que votes, discutas y compartas ideas.",
"home.lonely.suggestion": "Se recomienda que cree <0>al menos 3</0> sugerencias aquí antes de compartir este sitio. El contenido inicial es importante para empezar a atraer a su audiencia.",
diff --git a/locale/fr/client.json b/locale/fr/client.json
index fa54bb2f0..c92b47ac8 100644
--- a/locale/fr/client.json
+++ b/locale/fr/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Vous n'êtes pas autorisé à accéder à cette page.",
"error.unauthorized.title": "Non autorisé",
"home.filter.label": "Flitrer",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Entrez votre suggestion ici...",
"home.form.defaultwelcomemessage": "Nous aimerions savoir ce que vous pensez.\n\nQue pouvons-nous faire de mieux ? C'est ici que vous pouvez voter, discuter et partager vos idées.",
"home.lonely.suggestion": "Il est recommandé de créer <0>au moins 3</0> suggestions avant de partager ce site. Le contenu initial est important pour commencer à engager votre public.",
diff --git a/locale/it/client.json b/locale/it/client.json
index 471747f29..5df8408ea 100644
--- a/locale/it/client.json
+++ b/locale/it/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Non sei autorizzato a visualizzare questa pagina.",
"error.unauthorized.title": "Non autorizzato",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Inserisci qui il tuo suggerimento...",
"home.form.defaultwelcomemessage": "Ci piacerebbe sentire quello che stai pensando.\n\nChe cosa possiamo fare meglio? Questo è il posto per voi per votare, discutere e condividere idee.",
"home.lonely.suggestion": "Si consiglia di creare <0>almeno 3</0> suggerimenti qui prima di condividere questo sito. Il contenuto iniziale è importante per iniziare ad coinvolgere il pubblico.",
diff --git a/locale/ja/client.json b/locale/ja/client.json
index 1f97f6818..332dc8ded 100644
--- a/locale/ja/client.json
+++ b/locale/ja/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "このページを閲覧する権限がありません。",
"error.unauthorized.title": "権限がありません",
"home.filter.label": "フィルタ",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "ここに提案を入力してください...",
"home.form.defaultwelcomemessage": "皆さんが考えていることをお聞きかせください。\n\nどう改善できますでしょうか? ここでは、あなたが投票、議論、アイデアを共有する場所です。",
"home.lonely.suggestion": "このサイトを共有する前に、<0>少なくとも3</0>の提案をここで作成することをお勧めします。最初のコンテンツは、ユーザーを引き付けるために重要です。",
diff --git a/locale/ko/client.json b/locale/ko/client.json
index b6b4abf3a..653e4ac95 100644
--- a/locale/ko/client.json
+++ b/locale/ko/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "You are not authorized to view this page.",
"error.unauthorized.title": "Not Authorized",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Enter your suggestion here...",
"home.form.defaultwelcomemessage": "We'd love to hear what you're thinking about.\n\nWhat can we do better? This is the place for you to vote, discuss and share ideas.",
"home.lonely.suggestion": "It's recommended that you create <0>at least 3</0> suggestions here before sharing this site. The initial content is important to start engaging your audience.",
diff --git a/locale/nl/client.json b/locale/nl/client.json
index 9d9ff3357..649ac9f4e 100644
--- a/locale/nl/client.json
+++ b/locale/nl/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Je bent niet bevoegd om deze pagina te bekijken.",
"error.unauthorized.title": "Geen toegang",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Deel jouw suggesties hier...",
"home.form.defaultwelcomemessage": "We horen graag waar je aan denkt.\n\nWat kunnen we beter doen? Dit is de plek waar je op ideeën kunt stemmen en reageren, en ook je eigen ideeën kunt delen.",
"home.lonely.suggestion": "Het is aanbevolen om <0>tenminste 3 ideeën</0> aan te maken voor het delen van de site. De initiële inhoud is belangrijk om jouw publiek te motiveren om deel te nemen.",
diff --git a/locale/pl/client.json b/locale/pl/client.json
index 93ba19186..53888fabe 100644
--- a/locale/pl/client.json
+++ b/locale/pl/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Nie masz uprawnień do przeglądania tej strony.",
"error.unauthorized.title": "Brak autoryzacji",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Wpisz swoją sugestię tutaj...",
"home.form.defaultwelcomemessage": "Chcemy się dowiedzieć o czym myślisz.\n\nCo możemy poprawić? To jest miejsce, w którym możesz głosować, dyskutować i dzielić się pomysłami.",
"home.lonely.suggestion": "Zaleca się stworzenie tutaj <0>co najmniej 3</0> sugestii przed udostępnieniem tej witryny. Początkowa zawartość jest ważna do zaangażowania swoich odbiorców.",
diff --git a/locale/pt-BR/client.json b/locale/pt-BR/client.json
index 8834a79af..a47640ace 100644
--- a/locale/pt-BR/client.json
+++ b/locale/pt-BR/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Você não está autorizado a visualizar esta página.",
"error.unauthorized.title": "Não autorizado",
"home.filter.label": "Filtrar",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Insira sua sugestão aqui...",
"home.form.defaultwelcomemessage": "Gostaríamos de ouvir sobre o que você está pensando.\n\nO que podemos fazer melhor? Este é o lugar para você votar, discutir e compartilhar ideias.",
"home.lonely.suggestion": "É recomendável que você crie <0>pelo menos 3</0> sugestões aqui antes de compartilhar este site. O conteúdo inicial é importante para começar a engajar seu público.",
diff --git a/locale/ru/client.json b/locale/ru/client.json
index d43441d49..81bc3cee0 100644
--- a/locale/ru/client.json
+++ b/locale/ru/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Вы не можете просматривать эту страницу.",
"error.unauthorized.title": "Не авторизован",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Введите предложение здесь...",
"home.form.defaultwelcomemessage": "Мы хотели бы услышать ваше мнение. \n\nКак мы можем улучшиться? Здесь можно голосовать, обсуждать и делиться идеями.",
"home.lonely.suggestion": "Советуем создать <0>хотя бы 3</0> предложения перед публикацией этого сайта. Это важно для большего вовлечения аудитории.",
diff --git a/locale/si-LK/client.json b/locale/si-LK/client.json
index f35966163..6b9aee5f3 100644
--- a/locale/si-LK/client.json
+++ b/locale/si-LK/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "You are not authorized to view this page.",
"error.unauthorized.title": "Not Authorized",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Enter your suggestion here...",
"home.form.defaultwelcomemessage": "We'd love to hear what you're thinking about.\n\nWhat can we do better? This is the place for you to vote, discuss and share ideas.",
"home.lonely.suggestion": "It's recommended that you create <0>at least 3</0> suggestions here before sharing this site. The initial content is important to start engaging your audience.",
diff --git a/locale/sk/client.json b/locale/sk/client.json
index ea7e14238..d3e919b17 100644
--- a/locale/sk/client.json
+++ b/locale/sk/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Nemáte oprávnenie na zobrazenie tejto stránky.",
"error.unauthorized.title": "Neautorizovaný",
"home.filter.label": "Filtrovať",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Sem zadajte svoj návrh...",
"home.form.defaultwelcomemessage": "Radi by sme počuli, čo máte na mysli.\n\nČo môžeme urobiť lepšie? Tu môžete hlasovať, diskutovať a zdieľať nápady.",
"home.lonely.suggestion": "Pred zdieľaním tejto stránky tu odporúčame vytvoriť <0> aspoň 3 </0> návrhy. Počiatočný obsah je dôležitý, aby ste mohli zaujať publikum.",
diff --git a/locale/sv-SE/client.json b/locale/sv-SE/client.json
index 01df93df5..cc064d68b 100644
--- a/locale/sv-SE/client.json
+++ b/locale/sv-SE/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Du har inte behörighet att se den här sidan.",
"error.unauthorized.title": "Ej behörig",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Skriv ditt förslag här...",
"home.form.defaultwelcomemessage": "Vi vill gärna höra vad du tänker på.\n\nVad kan vi göra bättre? Detta är platsen för dig att rösta, diskutera och dela idéer.",
"home.lonely.suggestion": "Vi rekommenderar att du skapar <0>minst 3</0> förslag här innan du börjar dela den här webbplatsen. Det initiala innehållet är viktigt för att engagera dina besökare.",
diff --git a/locale/tr/client.json b/locale/tr/client.json
index c6e20c0be..e468d28f4 100644
--- a/locale/tr/client.json
+++ b/locale/tr/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "Bu sayfayı görüntülemek için yetkiniz yok.",
"error.unauthorized.title": "Yetkili Değil",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "Önerinizi buraya yazın...",
"home.form.defaultwelcomemessage": "Ne düşündüğünüzü öğrenmeyi çok isteriz.\n\nKendimizi nasıl geliştirebiliriz? Burada önerileri oylayabilir, tartışabilir ya da paylaşabilirsiniz.",
"home.lonely.suggestion": "Siteyi paylaşmadan önce buraya <0>en az 3</0> öneri girmenizi tavsiye ederiz. İlk içerikler, hedef kitlenizin etkileşime geçmesi için önemlidir.",
diff --git a/locale/zh-CN/client.json b/locale/zh-CN/client.json
index 6791e5c5d..da72fdc2e 100644
--- a/locale/zh-CN/client.json
+++ b/locale/zh-CN/client.json
@@ -37,6 +37,7 @@
"error.unauthorized.text": "您无权查看此页面.",
"error.unauthorized.title": "未经授权",
"home.filter.label": "Filter",
+ "home.filter.search.label": "Search in filters...",
"home.form.defaultinvitation": "在此处输入您的建议...",
"home.form.defaultwelcomemessage": "我们很想听听你在想什么。\n\n我们能做得更好吗?这是您投票、讨论和分享想法的地方.",
"home.lonely.suggestion": "建议您在共享此网站之前,在此处创建<0>至少3个</0>建议。初始内容对于开始吸引观众很重要.",
diff --git a/public/assets/styles/index.scss b/public/assets/styles/index.scss
index 46d1493af..1dc1c4119 100644
--- a/public/assets/styles/index.scss
+++ b/public/assets/styles/index.scss
@@ -1,4 +1,7 @@
-@import "variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
+
@import "reset.scss";
@import "utility.scss";
@import "tooltip.scss";
+@include theme($light-colors, '[data-theme="light"]');
+@include theme($dark-colors, '[data-theme="dark"]');
diff --git a/public/assets/styles/variables.scss b/public/assets/styles/variables.scss
index d8c737785..5644592fa 100644
--- a/public/assets/styles/variables.scss
+++ b/public/assets/styles/variables.scss
@@ -18,8 +18,6 @@
/* @include get-theme("dark"); */
$colors: $dark-colors;
-@include theme($light-colors, '[data-theme="light"]');
-@include theme($dark-colors, '[data-theme="dark"]');
@include default.all;
@include variable.all;
diff --git a/public/components/NotificationIndicator.scss b/public/components/NotificationIndicator.scss
index d7ab49374..851ebdf70 100644
--- a/public/components/NotificationIndicator.scss
+++ b/public/components/NotificationIndicator.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-notification-indicator {
position: relative;
diff --git a/public/components/Reactions.scss b/public/components/Reactions.scss
index 056f154b1..7629df37f 100644
--- a/public/components/Reactions.scss
+++ b/public/components/Reactions.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-reactions {
@@ -17,4 +17,4 @@
button {
background-color: 'pink';
}
-}
\ No newline at end of file
+}
diff --git a/public/components/ShowTag.scss b/public/components/ShowTag.scss
index 3399488c6..f9844da9d 100644
--- a/public/components/ShowTag.scss
+++ b/public/components/ShowTag.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-tag {
display: inline-flex;
diff --git a/public/components/VoteCounter.scss b/public/components/VoteCounter.scss
index 740eaff0a..a21da5be1 100644
--- a/public/components/VoteCounter.scss
+++ b/public/components/VoteCounter.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-vote-counter {
&__button {
diff --git a/public/components/common/Avatar.scss b/public/components/common/Avatar.scss
index b5691a2b3..ebe4223c1 100644
--- a/public/components/common/Avatar.scss
+++ b/public/components/common/Avatar.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-avatar {
border-radius: 50%;
diff --git a/public/components/common/AvatarStack.scss b/public/components/common/AvatarStack.scss
index bfd562eb2..758a2a27f 100644
--- a/public/components/common/AvatarStack.scss
+++ b/public/components/common/AvatarStack.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-avatar-stack {
> * {
diff --git a/public/components/common/Button.scss b/public/components/common/Button.scss
index 91c8d7f4f..4d2ee1e4e 100644
--- a/public/components/common/Button.scss
+++ b/public/components/common/Button.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-button {
line-height: 1.15;
diff --git a/public/components/common/Button.tsx b/public/components/common/Button.tsx
index eff731f55..d683a2b17 100644
--- a/public/components/common/Button.tsx
+++ b/public/components/common/Button.tsx
@@ -29,9 +29,10 @@ export class ButtonClickEvent {
export const Button: React.FC<ButtonProps> = ({ size = "default", variant = "secondary", type = "button", ...props }) => {
const [clicked, setClicked] = useState(false)
- const unmountedContainer = useRef(false)
+ const unmountedContainer = useRef(true)
useEffect(() => {
+ unmountedContainer.current = false
return () => {
unmountedContainer.current = true
}
diff --git a/public/components/common/DevBanner.scss b/public/components/common/DevBanner.scss
index 96f8ce78c..cf729dbe5 100644
--- a/public/components/common/DevBanner.scss
+++ b/public/components/common/DevBanner.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-dev-banner {
position: fixed;
diff --git a/public/components/common/Dropdown.scss b/public/components/common/Dropdown.scss
index e7b95bedd..7edf1068f 100644
--- a/public/components/common/Dropdown.scss
+++ b/public/components/common/Dropdown.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-dropdown {
display: inline-block;
diff --git a/public/components/common/Hint.scss b/public/components/common/Hint.scss
index b54acb59d..782de083a 100644
--- a/public/components/common/Hint.scss
+++ b/public/components/common/Hint.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-hint {
position: relative;
diff --git a/public/components/common/HoverInfo.scss b/public/components/common/HoverInfo.scss
index 7abf17bde..e6da37e28 100644
--- a/public/components/common/HoverInfo.scss
+++ b/public/components/common/HoverInfo.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-hoverinfo {
margin-inline-start: spacing(1);
diff --git a/public/components/common/Loader.scss b/public/components/common/Loader.scss
index 4a4c2d0a0..b6fb3c0c7 100644
--- a/public/components/common/Loader.scss
+++ b/public/components/common/Loader.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-loader {
&__spinner {
diff --git a/public/components/common/Markdown.scss b/public/components/common/Markdown.scss
index 1dfdbb0bd..52e2ede29 100644
--- a/public/components/common/Markdown.scss
+++ b/public/components/common/Markdown.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-markdown,
.tiptap {
diff --git a/public/components/common/Message.scss b/public/components/common/Message.scss
index 060beb5c4..639fd92cf 100644
--- a/public/components/common/Message.scss
+++ b/public/components/common/Message.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-message {
padding: spacing(4);
diff --git a/public/components/common/Modal.scss b/public/components/common/Modal.scss
index 96bb5ed2a..13143bd17 100644
--- a/public/components/common/Modal.scss
+++ b/public/components/common/Modal.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
$c-modal-dimmer-padding: 1em;
diff --git a/public/components/common/PoweredByFider.scss b/public/components/common/PoweredByFider.scss
index a9e0d439d..112907b3f 100644
--- a/public/components/common/PoweredByFider.scss
+++ b/public/components/common/PoweredByFider.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-powered {
text-align: center;
diff --git a/public/components/common/SignInControl.scss b/public/components/common/SignInControl.scss
index 69d705659..e26dd3552 100644
--- a/public/components/common/SignInControl.scss
+++ b/public/components/common/SignInControl.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-signin-control {
padding-left: 45px;
diff --git a/public/components/common/TagsSelect.scss b/public/components/common/TagsSelect.scss
index f11d11f5b..dda71d947 100644
--- a/public/components/common/TagsSelect.scss
+++ b/public/components/common/TagsSelect.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.dropdown-wrapper {
position: relative;
diff --git a/public/components/common/Toggle.scss b/public/components/common/Toggle.scss
index 5408bbb74..8eb85b0b2 100644
--- a/public/components/common/Toggle.scss
+++ b/public/components/common/Toggle.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
@mixin transition {
transition-duration: 0.2s;
diff --git a/public/components/common/UserName.scss b/public/components/common/UserName.scss
index ed61b1eec..c76381f9f 100644
--- a/public/components/common/UserName.scss
+++ b/public/components/common/UserName.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-username {
color: var(--colors-gray-900);
diff --git a/public/components/common/form/Checkbox.scss b/public/components/common/form/Checkbox.scss
index f51e2d54d..8ea7b5933 100644
--- a/public/components/common/form/Checkbox.scss
+++ b/public/components/common/form/Checkbox.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-checkbox input {
margin: 0px;
diff --git a/public/components/common/form/CommentEditor.scss b/public/components/common/form/CommentEditor.scss
index 64d9411ae..089966270 100644
--- a/public/components/common/form/CommentEditor.scss
+++ b/public/components/common/form/CommentEditor.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
/* Styling for content elements */
.fider-tiptap-editor .ProseMirror {
@@ -76,6 +76,10 @@
overflow: hidden;
background-color: var(--colors-white);
+ &.m-error {
+ border-color: var(--colors-red-600);
+ }
+
.tiptap {
:first-child {
margin-top: 0;
diff --git a/public/components/common/form/CommentEditor.tsx b/public/components/common/form/CommentEditor.tsx
index 353f1ee62..b186c9897 100644
--- a/public/components/common/form/CommentEditor.tsx
+++ b/public/components/common/form/CommentEditor.tsx
@@ -21,11 +21,12 @@ import IconCode from "@fider/assets/images/heroicons-code.svg"
import IconAt from "@fider/assets/images/heroicons-at.svg"
import IconOrderedList from "@fider/assets/images/heroicons-orderedlist.svg"
import IconBulletList from "@fider/assets/images/heroicons-bulletlist.svg"
-import { Icon } from "@fider/components"
+import { DisplayError, hasError, Icon, ValidationContext } from "@fider/components"
import suggestion from "./suggestion"
import { CustomMention } from "./CustomMention"
import { Trans } from "@lingui/react/macro"
+import { classSet } from "@fider/services"
const MenuBar = ({
editor,
@@ -167,6 +168,7 @@ interface CommentEditorProps {
onChange?: (value: string) => void
onFocus?: () => void
disabled: boolean
+ field: string
}
const markdownToHtml = (markdownString: string) => {
@@ -262,10 +264,22 @@ const Tiptap: React.FunctionComponent<CommentEditorProps> = (props) => {
) // Re-initialize when mode changes
return (
- <div className="fider-tiptap-editor">
- <MenuBar disabled={props.disabled} editor={editor} isMarkdownMode={isRawMarkdownMode} toggleMarkdownMode={toggleMarkdownMode} />
- <EditorContent editor={editor} />
- </div>
+ <ValidationContext.Consumer>
+ {(ctx) => (
+ <div>
+ <div
+ className={classSet({
+ "fider-tiptap-editor": true,
+ "m-error": hasError(props.field, ctx.error),
+ })}
+ >
+ <MenuBar disabled={props.disabled} editor={editor} isMarkdownMode={isRawMarkdownMode} toggleMarkdownMode={toggleMarkdownMode} />
+ <EditorContent editor={editor} />
+ </div>
+ <DisplayError fields={[props.field]} error={ctx.error} />
+ </div>
+ )}
+ </ValidationContext.Consumer>
)
}
diff --git a/public/components/common/form/DisplayError.scss b/public/components/common/form/DisplayError.scss
index b6a7362ca..db1351a39 100644
--- a/public/components/common/form/DisplayError.scss
+++ b/public/components/common/form/DisplayError.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-form-error {
color: var(--colors-red-600);
diff --git a/public/components/common/form/Form.scss b/public/components/common/form/Form.scss
index ca6217a4d..7db8265a3 100644
--- a/public/components/common/form/Form.scss
+++ b/public/components/common/form/Form.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-form-field {
margin-bottom: spacing(7);
diff --git a/public/components/common/form/ImageUploader.scss b/public/components/common/form/ImageUploader.scss
index 97ba79d4b..c75f0dd9d 100644
--- a/public/components/common/form/ImageUploader.scss
+++ b/public/components/common/form/ImageUploader.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-image-upload {
margin-bottom: 0;
diff --git a/public/components/common/form/ImageViewer.scss b/public/components/common/form/ImageViewer.scss
index e4f9fad67..791ed1b74 100644
--- a/public/components/common/form/ImageViewer.scss
+++ b/public/components/common/form/ImageViewer.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-image-viewer {
display: inline-block;
diff --git a/public/components/common/form/Input.scss b/public/components/common/form/Input.scss
index 94fe9746f..2ac3063ed 100644
--- a/public/components/common/form/Input.scss
+++ b/public/components/common/form/Input.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-input {
line-height: get("font.size.xl");
@@ -62,4 +62,4 @@
left: 0;
right: unset;
}
-}
\ No newline at end of file
+}
diff --git a/public/components/common/form/MentionList.scss b/public/components/common/form/MentionList.scss
index 2b65e040b..74990ec11 100644
--- a/public/components/common/form/MentionList.scss
+++ b/public/components/common/form/MentionList.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
/* Dropdown menu */
.dropdown-menu {
diff --git a/public/components/common/form/MultiImageUploader.scss b/public/components/common/form/MultiImageUploader.scss
index b0e667da0..8c3622167 100644
--- a/public/components/common/form/MultiImageUploader.scss
+++ b/public/components/common/form/MultiImageUploader.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-multi-image-uploader {
padding-top: spacing(2);
diff --git a/public/components/common/form/MultiImageUploader.tsx b/public/components/common/form/MultiImageUploader.tsx
index 148a07ee0..62fd1e223 100644
--- a/public/components/common/form/MultiImageUploader.tsx
+++ b/public/components/common/form/MultiImageUploader.tsx
@@ -16,13 +16,12 @@ interface MultiImageUploaderProps {
interface MultiImageUploaderInstances {
[key: string]: {
- element: JSX.Element
+ element: React.JSX.Element
upload?: ImageUpload
}
}
interface MultiImageUploaderState {
- count: number
instances: MultiImageUploaderInstances
removed: ImageUpload[]
}
@@ -31,42 +30,35 @@ export class MultiImageUploader extends React.Component<MultiImageUploaderProps,
constructor(props: MultiImageUploaderProps) {
super(props)
- let count = 1
const instances = {}
if (props.bkeys) {
for (const bkey of props.bkeys) {
- count++
this.addNewElement(instances, bkey)
}
}
- if (count <= this.props.maxUploads) {
- count++
+ if (Object.keys(instances).length <= this.props.maxUploads) {
this.addNewElement(instances)
}
- this.state = { instances, count, removed: [] }
+ this.state = { instances, removed: [] }
}
private imageUploaded = (upload: ImageUpload, instanceID: string) => {
const instances = { ...this.state.instances }
const removed = [...this.state.removed]
- let count = this.state.count
if (upload.remove) {
if (upload.bkey) {
removed.push(upload)
}
delete instances[instanceID]
- if (--count === this.props.maxUploads) {
- this.addNewElement(instances)
- }
} else {
instances[instanceID].upload = upload
- if (count++ <= this.props.maxUploads) {
- this.addNewElement(instances)
- }
}
- this.setState({ instances, count, removed }, this.triggerOnChange)
+ if (Object.keys(instances).length < this.props.maxUploads && !this.hasUploadButton(instances)) {
+ this.addNewElement(instances)
+ }
+ this.setState({ instances, removed }, this.triggerOnChange)
}
private triggerOnChange() {
@@ -86,6 +78,15 @@ export class MultiImageUploader extends React.Component<MultiImageUploaderProps,
}
}
+ private hasUploadButton(instances: MultiImageUploaderInstances) {
+ for (const instance of Object.values(instances)) {
+ if (instance.upload == null) {
+ return true
+ }
+ }
+ return false
+ }
+
public render() {
const elements = Object.keys(this.state.instances).map((k) => this.state.instances[k].element)
return (
diff --git a/public/components/common/form/RadioButton.scss b/public/components/common/form/RadioButton.scss
index cb956d46c..18fed64c8 100644
--- a/public/components/common/form/RadioButton.scss
+++ b/public/components/common/form/RadioButton.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-radiobutton input {
margin: 0px;
diff --git a/public/components/common/form/Select.scss b/public/components/common/form/Select.scss
index b51ab54cf..68b9c32ac 100644
--- a/public/components/common/form/Select.scss
+++ b/public/components/common/form/Select.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-select {
background-color: var(--colors-white);
diff --git a/public/components/common/form/TextArea.scss b/public/components/common/form/TextArea.scss
index d5c4117d5..b21088120 100644
--- a/public/components/common/form/TextArea.scss
+++ b/public/components/common/form/TextArea.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-textarea {
background-color: var(--colors-white);
diff --git a/public/pages/Administration/components/AdminBasePage.scss b/public/pages/Administration/components/AdminBasePage.scss
index 5059bc7f4..2a6a33b42 100644
--- a/public/pages/Administration/components/AdminBasePage.scss
+++ b/public/pages/Administration/components/AdminBasePage.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-admin-basepage {
display: grid;
diff --git a/public/pages/Administration/components/SideMenu.scss b/public/pages/Administration/components/SideMenu.scss
index 23cf94e40..f5c8298b9 100644
--- a/public/pages/Administration/components/SideMenu.scss
+++ b/public/pages/Administration/components/SideMenu.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-side-menu {
&__item {
diff --git a/public/pages/Administration/components/webhook/WebhookFailInfo.scss b/public/pages/Administration/components/webhook/WebhookFailInfo.scss
index df4571ede..3b529ad1d 100644
--- a/public/pages/Administration/components/webhook/WebhookFailInfo.scss
+++ b/public/pages/Administration/components/webhook/WebhookFailInfo.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-webhook-failinfo {
pre {
diff --git a/public/pages/Administration/components/webhook/WebhookForm.scss b/public/pages/Administration/components/webhook/WebhookForm.scss
index 83df086c1..d29bfd3a7 100644
--- a/public/pages/Administration/components/webhook/WebhookForm.scss
+++ b/public/pages/Administration/components/webhook/WebhookForm.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-webhook-form {
&__content {
diff --git a/public/pages/Administration/components/webhook/WebhookListItem.scss b/public/pages/Administration/components/webhook/WebhookListItem.scss
index 5cdd1f5fa..bffbd0e5a 100644
--- a/public/pages/Administration/components/webhook/WebhookListItem.scss
+++ b/public/pages/Administration/components/webhook/WebhookListItem.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-webhook-listitem {
&__icon {
diff --git a/public/pages/Administration/components/webhook/WebhookProperties.scss b/public/pages/Administration/components/webhook/WebhookProperties.scss
index b60ecffaf..708c9172e 100644
--- a/public/pages/Administration/components/webhook/WebhookProperties.scss
+++ b/public/pages/Administration/components/webhook/WebhookProperties.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-webhook-properties {
border-spacing: 0;
diff --git a/public/pages/Administration/components/webhook/WebhookTemplateInfoModal.scss b/public/pages/Administration/components/webhook/WebhookTemplateInfoModal.scss
index 26f33df64..c3a7c7731 100644
--- a/public/pages/Administration/components/webhook/WebhookTemplateInfoModal.scss
+++ b/public/pages/Administration/components/webhook/WebhookTemplateInfoModal.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-webhook-templateinfo {
pre {
diff --git a/public/pages/DesignSystem/DesignSystem.page.scss b/public/pages/DesignSystem/DesignSystem.page.scss
index 5b0187b81..63a507abe 100644
--- a/public/pages/DesignSystem/DesignSystem.page.scss
+++ b/public/pages/DesignSystem/DesignSystem.page.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
#p-ui-toolkit {
.color {
diff --git a/public/pages/Home/Home.page.scss b/public/pages/Home/Home.page.scss
index a00314ef5..ec97bf32c 100644
--- a/public/pages/Home/Home.page.scss
+++ b/public/pages/Home/Home.page.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
#p-home {
display: grid;
diff --git a/public/pages/Home/components/PostFilter.scss b/public/pages/Home/components/PostFilter.scss
new file mode 100644
index 000000000..4e4afb897
--- /dev/null
+++ b/public/pages/Home/components/PostFilter.scss
@@ -0,0 +1,6 @@
+@use "~@fider/assets/styles/variables.scss" as *;
+
+.filter-input {
+ margin: spacing(2);
+ width: calc(100% - spacing(4));
+}
diff --git a/public/pages/Home/components/PostFilter.tsx b/public/pages/Home/components/PostFilter.tsx
index 571159738..165fe184c 100644
--- a/public/pages/Home/components/PostFilter.tsx
+++ b/public/pages/Home/components/PostFilter.tsx
@@ -1,14 +1,14 @@
-import React from "react"
+import React, { useState } from "react"
import { PostStatus, Tag } from "@fider/models"
import { Checkbox, Dropdown, Icon } from "@fider/components"
import { HStack } from "@fider/components/layout"
import HeroIconFilter from "@fider/assets/images/heroicons-filter.svg"
-
import { useFider } from "@fider/hooks"
import { i18n } from "@lingui/core"
-
import { FilterState } from "./PostsContainer"
+import "./PostFilter.scss"
+
type FilterType = "tag" | "status" | "myVotes"
interface OptionItem {
@@ -62,6 +62,7 @@ export const PostFilter = (props: PostFilterProps) => {
const fider = useFider()
const filterItems: FilterItem[] = FilterStateToFilterItems(props.activeFilter)
+ const [query, setQuery] = useState("")
const handleChangeFilter = (item: OptionItem) => () => {
const exists = filterItems.find((i) => i.type === item.type && i.value === item.value)
@@ -70,6 +71,7 @@ export const PostFilter = (props: PostFilterProps) => {
: [...filterItems, { type: item.type, value: item.value }]
props.filtersChanged(FilterItemsToFilterState(newFilter))
+ setQuery("")
}
const options: OptionItem[] = []
@@ -96,10 +98,12 @@ export const PostFilter = (props: PostFilterProps) => {
})
const filterCount = filterItems.length
+ const filteredOptions = options.filter((option) => option.label.toLowerCase().includes(query.toLowerCase()))
return (
<HStack className="mr-4">
<Dropdown
+ onToggled={() => setQuery("")}
renderHandle={
<HStack className="h-10 text-medium text-xs rounded-md uppercase border border-gray-400 text-gray-800 p-2 px-3">
<Icon sprite={HeroIconFilter} className="h-5 pr-1" />
@@ -108,7 +112,14 @@ export const PostFilter = (props: PostFilterProps) => {
</HStack>
}
>
- {options.map((o) => {
+ <input
+ type="text"
+ value={query}
+ onChange={(e) => setQuery(e.target.value)}
+ className="c-input filter-input"
+ placeholder={i18n._("home.filter.search.label", { message: "Search in filters..." })}
+ />
+ {filteredOptions.map((o) => {
const isChecked = filterItems.find((f) => f.type === o.type && f.value === o.value) !== undefined
return (
diff --git a/public/pages/Home/components/PostsContainer.scss b/public/pages/Home/components/PostsContainer.scss
index cda522cc4..d572d24ce 100644
--- a/public/pages/Home/components/PostsContainer.scss
+++ b/public/pages/Home/components/PostsContainer.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-posts-container {
&__header {
diff --git a/public/pages/Legal/Legal.page.scss b/public/pages/Legal/Legal.page.scss
index 851cd28c6..328b074b2 100644
--- a/public/pages/Legal/Legal.page.scss
+++ b/public/pages/Legal/Legal.page.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
/* purgecss start ignore */
#p-legal {
padding: 50px 0;
diff --git a/public/pages/ShowPost/ShowPost.page.scss b/public/pages/ShowPost/ShowPost.page.scss
index 02d0e1f06..12828997d 100644
--- a/public/pages/ShowPost/ShowPost.page.scss
+++ b/public/pages/ShowPost/ShowPost.page.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
#p-show-post {
.post-header {
diff --git a/public/pages/ShowPost/components/CommentInput.tsx b/public/pages/ShowPost/components/CommentInput.tsx
index 12344ea89..76a0a3d25 100644
--- a/public/pages/ShowPost/components/CommentInput.tsx
+++ b/public/pages/ShowPost/components/CommentInput.tsx
@@ -87,6 +87,7 @@ export const CommentInput = (props: CommentInputProps) => {
{isClient ? (
<>
<CommentEditor
+ field="content"
disabled={!Fider.session.isAuthenticated}
onChange={commentChanged}
onFocus={editorFocused}
diff --git a/public/pages/ShowPost/components/MentionSelector.scss b/public/pages/ShowPost/components/MentionSelector.scss
index acec6a61a..de3df56e0 100644
--- a/public/pages/ShowPost/components/MentionSelector.scss
+++ b/public/pages/ShowPost/components/MentionSelector.scss
@@ -1,4 +1,4 @@
-@import "~@fider/assets/styles/variables.scss";
+@use "~@fider/assets/styles/variables.scss" as *;
.c-mention-selector {
position: absolute;
diff --git a/public/pages/ShowPost/components/ShowComment.tsx b/public/pages/ShowPost/components/ShowComment.tsx
index 5d45871fb..11a19fe30 100644
--- a/public/pages/ShowPost/components/ShowComment.tsx
+++ b/public/pages/ShowPost/components/ShowComment.tsx
@@ -197,7 +197,13 @@ export const ShowComment = (props: ShowCommentProps) => {
<div>
{isEditing ? (
<Form error={error}>
- <CommentEditor disabled={!fider.session.isAuthenticated} initialValue={newContent} onChange={setNewContent} placeholder={comment.content} />
+ <CommentEditor
+ field="content"
+ disabled={!fider.session.isAuthenticated}
+ initialValue={newContent}
+ onChange={setNewContent}
+ placeholder={comment.content}
+ />
<MultiImageUploader field="attachments" bkeys={comment.attachments} maxUploads={2} onChange={setAttachments} />
<Button size="small" onClick={saveEdit} variant="primary">
<Trans id="action.save">Save</Trans>