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

Fix new search field #84

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ js/node_modules/
vendor/
composer.lock
js/dist
.idea
4 changes: 2 additions & 2 deletions js/src/forum/components/SearchField.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import app from 'flarum/forum/app';
import Component from 'flarum/common/Component';
import LoadingIndicator from 'flarum/common/components/LoadingIndicator';
import withAttr from 'flarum/common/utils/withAttr';
import KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';
import ItemList from 'flarum/utils/ItemList';
import KeyboardNavigatable from 'flarum/forum/utils/KeyboardNavigatable';
import ItemList from 'flarum/common/utils/ItemList';
import TextFilter from '../searchTypes/TextFilter';
import GroupFilter from '../searchTypes/GroupFilter';

Expand Down
1 change: 1 addition & 0 deletions js/src/forum/components/SmallUserCard.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import app from 'flarum/forum/app';
import UserCard from 'flarum/forum/components/UserCard';
import ItemList from 'flarum/common/utils/ItemList';
import humanTime from 'flarum/common/utils/humanTime';
Expand Down
6 changes: 4 additions & 2 deletions js/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
// Use Flarum's tsconfig as a starting point
"extends": "flarum-tsconfig",
// This will match all .ts, .tsx, .d.ts, .js, .jsx files
"include": ["src/**/*"],
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
// and also tells your Typescript server to read core's global typings for
// access to `dayjs` and `$` in the global namespace.
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*"],
"compilerOptions": {
// This will output typings to `dist-typings`
"declarationDir": "./dist-typings",
Expand Down
19 changes: 15 additions & 4 deletions resources/less/components/SearchFiled.less
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
.Usersearchbox {
position: relative;
}

// Style based on TagDiscussionModal.less from flarum/tags
.UserDirectorySearchInput {
overflow-x: auto;
padding-top: 0;
padding-bottom: 0;
height: auto;
position: relative;
margin-left: 15px; // Space with sort dropdown

// Same background as .focus to give it better visibility
background-color: @body-bg;
color: @text-color;
border-color: @control-bg;

scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}

&:focus-within {
border-color: @primary-color;
}

input {
display: inline;
outline: none;
margin-top: -2px;
margin-top: -4px;
border: 0 !important;
padding: 0;
width: 100%;
margin-right: -100%;
background: transparent !important;
}
Expand Down