Add keyword filtering UI #172

Open
zongor wants to merge 526 commits from zongor/hexbear-frontend:feature/keyword-filtering into main
zongor commented 8 months ago
There is no content yet.
zongor added 1 commit 8 months ago
484b5505f0 Add keyword filtering UI
zongor added 1 commit 8 months ago
087754733f Add translation
zongor added 1 commit 8 months ago
c2f296e155 Add show
zongor added 1 commit 8 months ago
a09aff9e68 Fix lint errors
zongor added 1 commit 8 months ago
d2c5e9b024 fix translation
zongor added 1 commit 8 months ago
1a0607d073 Fix parens
ryexandrite approved these changes 8 months ago
Dismissed
ryexandrite left a comment

can you also attach some screenshots of this UI to the PR?

src/components/user.tsx Outdated
i.setState(i.state);
}
handleFilterKeywordsAdd(i: BaseUser, event: any) {
Poster
Owner

as a redundancy this function should check for and remove special characters that may break or cause a regex to misbehave.
alternitvly show an error to tthe user and fail.

as a redundancy this function should check for and remove special characters that may break or cause a regex to misbehave. alternitvly show an error to tthe user and fail.
Poster

are there any regex that we will allow? currently have it so that it removes all special characters. (like * any or somthing?)

are there any regex that we will allow? currently have it so that it removes all special characters. (like * any or somthing?)
Poster

I was thinking it might be a cool side effect to allow at least : and - because then people could filter out emotes if they wanted to.

I was thinking it might be a cool side effect to allow at least `:` and `-` because then people could filter out emotes if they wanted to.
Poster
Owner

as long as we can put in place midigations to prevent regex computation / exacution time and memory exploits in the backend (which rust supports) I think we can be ok allowing regex special chars.

as long as we can put in place midigations to prevent regex computation / exacution time and memory exploits in the backend (which rust supports) I think we can be ok allowing regex special chars.
Poster

Alright, did some simple testing for invalid regex and the backend filtered it out fine. Also added the size limit to the checker on the back end so we will have redunency there.

Alright, did some simple testing for invalid regex and the backend filtered it out fine. Also added the size limit to the checker on the back end so we will have redunency there.
ryexandrite marked this conversation as resolved
translations/en.json Outdated
"keywords_welcome":"Keywords to filter on hexbear",
"keywords_description":"Seperate by comma to add multiple keywords at once",
"keywords":"Keywords",
"add":"Add"
Poster
Owner

this i18n name should be something like keywords_add instead of just add to avoid future conflicts

this i18n name should be something like `keywords_add` instead of just `add` to avoid future conflicts
Poster

will change

will change
ryexandrite marked this conversation as resolved
ryexandrite dismissed ryexandrite’s review 8 months ago
Reason:

Not actualy approved

ryexandrite approved these changes 8 months ago
Dismissed
ryexandrite left a comment

Please address the comments above

Grat work on this, it's sorely needed.

ryexandrite dismissed ryexandrite’s review 8 months ago
ryexandrite requested changes 8 months ago
src/components/user.tsx Outdated
import { List } from 'immutable';
import update from 'immutability-helper';
import {
Disclosure,
Poster
Owner

Is there a better name for these component than Disclosure?

Is there a better name for these component than `Disclosure`?
Poster

Its from the '@reach/disclosure' library that we are using for the featured posts, they are the ones that named it that.

Its from the '@reach/disclosure' library that we are using for the featured posts, they are the ones that named it that.
Poster
Owner

ah, my bad. for some reason I was thinking these were somthing local.

ah, my bad. for some reason I was thinking these were somthing local.
ryexandrite marked this conversation as resolved
Poster
Owner

is that blue color of the keywords tied to the theme?

is that blue color of the keywords tied to the theme?
Poster

@ryexandrite yes, they are tied to the theme. The purple button is the "primary" and the blue buttons are "secondary". We could probably come up with a better color scheme though. The colors do not compement each other very well. Maybe we could use a tetratic color scheme?

@ryexandrite yes, they are tied to the theme. The purple button is the "primary" and the blue buttons are "secondary". We could probably come up with a better color scheme though. The colors do not compement each other very well. Maybe we could use a tetratic color scheme?
Poster

It would look somthing like this

It would look somthing like this
zongor added 1 commit 8 months ago
5baf3bb352 Change add to keywords_add
zongor added 1 commit 8 months ago
0f5622efc1 Remove special characters
zongor added 1 commit 8 months ago
908a1d5c29 Put it back, might be useful to keep special chars
zongor requested review from ryexandrite 8 months ago
ryexandrite approved these changes 8 months ago
ryexandrite left a comment

We'll want to come up with an alt color for the secondary color I think.

Everythin here looks good otherwise

@koa_lala do you have any ideas on secondary color

Poster
Owner

NOTE: do not merge this until hexbear-collective/lemmy-hexbear#296 is also merged

NOTE: do not merge this until hexbear-collective/lemmy-hexbear#296 is also merged
Poster
Owner

A couple things initially:

I'd change the blue color. In theme.tsx there are a couple other options for colors

"Keywords to filter on hexbear" is rather redundant. Can we reduce that to something like "keyword filtering"?

A couple things initially: I'd change the blue color. In theme.tsx there are a couple other options for colors "Keywords to filter on hexbear" is rather redundant. Can we reduce that to something like "keyword filtering"?
zongor added 11 commits 7 months ago
zongor added 1 commit 7 months ago
e34b9d4ac2 Merge
zongor added 519 commits 6 months ago
7db89bfab3 Revamp taglines to support custom markdown and several custom tags.
7a1e84572d Fixed bug with improper display of the lock status.
cc57937351 Merge branch 'main' into feature/keyword-filtering
zongor added 1 commit 6 months ago
e582ea21a5 Fix merge issues
zongor added 1 commit 6 months ago
45cfa3b385 Fix please
zongor added 1 commit 6 months ago
8b23efbd4c fix merge also
zongor added 1 commit 6 months ago
d866e76520 fix final merge issues
zongor added 1 commit 6 months ago
93923295f2 Add filtering pattern to websockets

Reviewers

ryexandrite approved these changes 8 months ago
Some checks failed
continuous-integration/drone/pr Build is failing
This pull request has changes conflicting with the target branch.
translations/en.json
Sign in to join this conversation.
Loading…
There is no content yet.