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

Production Release v1.0.5 #1455

Merged
merged 67 commits into from
Dec 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
12812bb
Change the check for ENVIRONMENT in the orysdk lib to check whether O…
thesocialdev Nov 6, 2024
b775755
Created an abstraction function that performs the query serialization…
pepermao Aug 16, 2024
2f7bfa4
Stop exposing the NextServer in the ViewService interface
thesocialdev Nov 8, 2024
6004489
Complete the refactoring of the ViewService render method
thesocialdev Nov 8, 2024
0f049f8
todo: removing the enableWarningDocument feature flag
LuizFNJ Nov 8, 2024
ba83fcf
Add conditional function in ClaimReviewHeader, using isClaimTypeAndNo…
lucaslobatob Nov 11, 2024
8abb51a
Correction bug in layout mobile version
Toxin4 Nov 12, 2024
7aa2fc5
Correction bug in layout mobile version
Toxin4 Nov 12, 2024
9d8f194
Merge branch 'stage' into feature-1413/layout-exceed-mobile-version
Toxin4 Nov 12, 2024
1b109c7
Merge pull request #1451 from AletheiaFact/Removing-the-enableWarning…
thesocialdev Nov 12, 2024
7f8e495
Merge branch 'stage' into prepare-nextjs-upgrade
thesocialdev Nov 12, 2024
d375901
Merge pull request #1452 from AletheiaFact/issue1433-BugVRPage
thesocialdev Nov 12, 2024
d199e6d
Remove bogus feature flag and remove unnecessary variables
thesocialdev Nov 12, 2024
5359403
Merge pull request #1449 from AletheiaFact/prepare-nextjs-upgrade
thesocialdev Nov 12, 2024
bbca092
Merge branch 'feature-1413/layout-exceed-mobile-version' of https://g…
Toxin4 Nov 12, 2024
3389145
Correction conflitcs
Toxin4 Nov 12, 2024
998b293
Suggestion names colors
LuizFNJ Oct 23, 2024
a20879b
Changing names in each components
LuizFNJ Oct 29, 2024
9f4e1ba
correct conflicts
LuizFNJ Nov 13, 2024
85accf7
changed "Shadow" for "shadow"
LuizFNJ Nov 13, 2024
87a2cd8
changed names colors "localConfig.schema" and readme de config
LuizFNJ Nov 13, 2024
df2f33a
Banner donation december
LuizFNJ Nov 6, 2024
6493a13
add register click in button
LuizFNJ Nov 8, 2024
b14254c
adding conditional with environment variable
LuizFNJ Nov 8, 2024
5ab2c05
Revert changes to localConfig imports
thesocialdev Oct 17, 2024
1855618
Merge pull request #1454 from AletheiaFact/incorporate-changes-for-uf…
thesocialdev Nov 13, 2024
d2cf557
Change in style to apply all paragraph and in the personality page
Toxin4 Nov 14, 2024
849f7c8
add environment variable in production
LuizFNJ Nov 14, 2024
8e2b165
correct last conflict
LuizFNJ Nov 14, 2024
d57c866
Merge branch 'stage' into Names-colors-more-generic
LuizFNJ Nov 14, 2024
6bfb856
adding conditional
LuizFNJ Nov 15, 2024
20a4cbe
Add async function to fetch search results with loading and error han…
lucaslobatob Nov 7, 2024
44dcc74
Add loading state to create personalities
lucaslobatob Nov 7, 2024
f1efd88
enhancement(loading-feedback): Create a redox state variable to manag…
Nov 14, 2024
5bff399
hide personality results while is loading
Nov 15, 2024
19b5a8f
use the correct text overlay variable
Nov 15, 2024
127634c
Merge pull request #1458 from AletheiaFact/desabling-donation-in-the-…
pepermao Nov 15, 2024
ca0ac77
Merge pull request #1446 from AletheiaFact/issue1175-AddLoadingFeedback
pepermao Nov 15, 2024
f30e334
Merge pull request #1453 from AletheiaFact/feature-1413/layout-exceed…
thesocialdev Nov 18, 2024
90e8de3
Merge pull request #1422 from AletheiaFact/Names-colors-more-generic
thesocialdev Nov 18, 2024
bd3724e
Merge branch 'stage' into Create-banner-donnation-december
LuizFNJ Nov 14, 2024
3fbb21a
Resolving ory login bug
LuizFNJ Nov 18, 2024
46b49a2
Merge pull request #1444 from AletheiaFact/Create-banner-donnation-de…
thesocialdev Nov 18, 2024
f17ce5e
correct color name and add arg in production build
LuizFNJ Nov 18, 2024
ac1426d
Merge pull request #1461 from AletheiaFact/correct-color-name-and-add…
thesocialdev Nov 18, 2024
f14dbad
Merge pull request #1459 from AletheiaFact/Resolving-bug-login-ory
thesocialdev Nov 18, 2024
01ee225
Filtering and search in user admin table
Toxin4 Nov 6, 2024
93c4331
Adding search tool in user administration table
LuizFNJ Nov 20, 2024
39593ef
Merge pull request #1442 from AletheiaFact/feature-1394/filtering-and…
thesocialdev Nov 20, 2024
281994a
Fixing missing query in about-page
LuizFNJ Nov 20, 2024
d9e0361
Merge pull request #1464 from AletheiaFact/Fixing-missing-query-in-ab…
pepermao Nov 21, 2024
7e8dd3a
implements dynamic search and AutoComplete component with topic valid…
lucaslobatob Nov 25, 2024
8a78c1e
adds MUI Joy to the project for styling and advanced components
lucaslobatob Nov 25, 2024
e2b93d0
update the Readme
LuizFNJ Nov 27, 2024
a35356b
remove schema JSON and adding link to it
LuizFNJ Nov 27, 2024
2184181
Adding close banner button using cookies
LuizFNJ Nov 27, 2024
6f832d8
Merge pull request #1473 from AletheiaFact/Update-the-Readme
thesocialdev Nov 29, 2024
81d7331
Merge pull request #1469 from AletheiaFact/issue1411-ChangeLibraryInT…
thesocialdev Nov 29, 2024
ba6e68e
Adjusting the edit button to stop overlapping over the AffixCTAButton…
lucaslobatob Dec 2, 2024
82f1ae4
last changes
LuizFNJ Dec 2, 2024
530caa5
Merge pull request #1474 from AletheiaFact/Latest-changes-donation-ba…
thesocialdev Dec 3, 2024
f37d343
Novu script to create subscribers from users from DataBase
caneppelevitor Dec 3, 2024
bcf646a
Refactoring banner logic
LuizFNJ Dec 3, 2024
ae0f0e9
moved "x" down
LuizFNJ Dec 3, 2024
6f85518
Merge pull request #1480 from AletheiaFact/script-novu-subscribers-fr…
thesocialdev Dec 3, 2024
2c47e3c
Merge pull request #1483 from AletheiaFact/refactoring-banner-logic
thesocialdev Dec 3, 2024
765f987
Merge pull request #1476 from AletheiaFact/1423-button-overlay
thesocialdev Dec 5, 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
Prev Previous commit
Next Next commit
implements dynamic search and AutoComplete component with topic valid…
…ation
  • Loading branch information
lucaslobatob committed Nov 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 7e8dd3ac585e66e9fe1a3c76a8865ca2746b5703
74 changes: 47 additions & 27 deletions src/components/topics/TopicForm.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Col } from "antd";
import React, { useState } from "react";
import { Controller, useForm } from "react-hook-form";
import Autocomplete from "../Form/Autocomplete";
import FormControl from "@mui/joy/FormControl";
import Autocomplete from "@mui/joy/Autocomplete";
import CircularProgress from "@mui/joy/CircularProgress";
import AletheiaButton from "../Button";
import TopicInputErrorMessages from "./TopicInputErrorMessages";
import { useTranslation } from "next-i18next";
import TopicsApi from "../../api/topicsApi";
import { ContentModelEnum } from "../../types/enums";
import { CssVarsProvider } from "@mui/joy/styles";

interface ITopicForm {
contentModel: ContentModelEnum;
@@ -38,12 +41,24 @@ const TopicForm = ({
reset,
} = useForm();
const [isLoading, setIsLoading] = useState(false);
const [options, setOptions] = useState([]);
const { t } = useTranslation();
const rules = {
required: t("common:requiredFieldError"),
validate: { duplicated: (v) => validateDuplication(v) },
};

const fetchOptions = async (inputValue: string) => {
if (inputValue.length >= 3) {
setIsLoading(true);
const fetchedOptions = await fetchTopicList(inputValue);
setOptions(fetchedOptions);
setIsLoading(false);
} else {
setOptions([]);
}
};

const handleOnSubmit = async () => {
try {
setIsLoading(true);
@@ -77,48 +92,53 @@ const TopicForm = ({
);
};

const onSelect = (_value, option) => {
if (option?.label && option?.value) {
setInputValue((prev) => [...prev, option]);
}
};

const onDeselect = (_value, option) => {
setInputValue((prev) =>
prev.filter(({ value }) => value !== option.value)
);
};

return (
<form onSubmit={handleSubmit(handleOnSubmit)}>
<Col style={{ display: "flex" }}>
<Controller
control={control}
name="topics"
rules={rules}
render={({ field }) => (
<Autocomplete
placeholder={t("topics:placeholder")}
dataCy="testSearchTopics"
onSelect={onSelect}
onDeselect={onDeselect}
mode="tags"
dataLoader={fetchTopicList}
preloadedTopics={topicsArray}
{...field}
/>
rules={{
validate: validateDuplication,
}}
render={({ field: { onChange, value } }) => (
<CssVarsProvider>

<FormControl sx={{ width: 655 }}>
<Autocomplete
freeSolo
multiple
placeholder={t("topics:placeholder")}
options={options}
onInputChange={(_, inputValue) => fetchOptions(inputValue)}
onChange={(_, selectedValues) => {
onChange(selectedValues);
setInputValue(selectedValues);
}}
getOptionLabel={(option) => option.label || ""}
isOptionEqualToValue={(option, value) => option.value === value.value}
loading={isLoading}
endDecorator={
isLoading ? (
<CircularProgress size="sm" />
) : null
}
/>
</FormControl>
</CssVarsProvider>
)}
/>
<AletheiaButton
htmlType="submit"
loading={isLoading}
style={{
height: 32,
borderRadius: 0,
height: 35,
borderRadius: 4,
borderTopRightRadius: 4,
borderBottomRightRadius: 4,
padding: "0 5px",
fontSize: 12,
marginLeft: 5,
}}
>
{t("topics:addTopicsButton")}