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

Frontend proposal page #16

Open
wants to merge 30 commits into
base: frontend
Choose a base branch
from
Open

Frontend proposal page #16

wants to merge 30 commits into from

Conversation

dmkit666
Copy link
Contributor

@dmkit666 dmkit666 commented Jan 9, 2025

I basically got all the functions done

AlanLiang-314 and others added 30 commits December 16, 2024 03:35
It looks terrible. I'll redesign it someday.
It has no actual functionality for now. We need to work on integration with the backend.

Note: I didn't use the `label` prop in `NativeSelect`, `MultiSelect`, and `Select` because the text looks too small.
Fixed a bug where having an empty or whitespace-only tag in the tag list
when submitting a post causes NullReferenceException.

Added ElementRequiredAttribute for applying RequiredAttribute to every
element in an IEnumerable.

In ElementMaxLengthAttribute, changed the element type of the foreach
from object to object? to better convey the intent, even though it
doesn't change anything.
Also removed some Include calls because ProjectTo didn't need those,
except for those in GetPostsByParameters. See the comment for details.
Added related migration files.

Modified init.sh to grant the Migrator user DROP privilege so that it
can undo migrations.
That is, "proposals" is no longer a dedicated page.

Also, I've done some small tweaks on the collapse logic of `Aside`.
and whether the currently logged-in user liked or disliked a post.
Removed the mention of "possible values" in the documentation of
CurrentUserVoteQueryResponseDto.VoteKind because the Swagger UI already
shows the possible values and because it doesn't get displayed in the
Swagger UI anyway.
This is to prepare for the integration with the new image and text
moderation features on the AI branch.
Added two endpoints that check if a piece of text or image contains
inappropriate content using AI.

Modified AI/.gitignore to make it ignore .env because it contained an
API key.

Fixed an issue where in AiController, none of the parameters showed up
as required in the Swagger UI (but they were still validated in the
backend so not a big issue).

Added the generated client code to frontend/openapi.
It can now search for posts with keywords in the title or content. It can use the sorting options, tags, and author filters on the side. Currently, it seems there are no other authors or different publishing times, so I'm not sure if the author filter and publishing time sorting will work properly.
I've finished setting up the AI search, but it might be a bit inconvenient to use. Additionally, the filter options for tags and authors on the side are ready too. You can type a single character, and all tags or authors containing that character will appear.
It will show all proposals by default
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.

4 participants