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

feat: DIA-1794: Revert "[FE] Implement home page in LSO and LSE" #7005

Closed
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion Dockerfile.development
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
ARG NODE_VERSION=18
ARG PYTHON_VERSION=3.12
ARG POETRY_VERSION=2.0.1
ARG POETRY_VERSION=1.8.4
ARG VERSION_OVERRIDE
ARG BRANCH_OVERRIDE

Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ docker-run-dev:
docker-migrate-dev:
docker compose run app python3 /label-studio/label_studio/manage.py migrate

docker-collectstatic-dev:
docker compose run app python3 /label-studio/label_studio/manage.py collectstatic

# Install modules
frontend-install:
cd web && yarn install --frozen-lockfile;
Expand Down
3 changes: 0 additions & 3 deletions label_studio/core/templates/home/home.html

This file was deleted.

9 changes: 3 additions & 6 deletions label_studio/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import pandas as pd
import requests
from core import utils
from core.feature_flags import all_flags, flag_set, get_feature_file_path
from core.feature_flags import all_flags, get_feature_file_path
from core.label_config import generate_time_series_json
from core.utils.common import collect_versions
from core.utils.io import find_file
Expand All @@ -27,7 +27,7 @@
HttpResponseServerError,
JsonResponse,
)
from django.shortcuts import redirect, render, reverse
from django.shortcuts import redirect, reverse
from django.template import loader
from django.utils._os import safe_join
from django.views.decorators.csrf import csrf_exempt
Expand Down Expand Up @@ -55,10 +55,7 @@
return redirect(reverse('user-login'))

# business mode access
if flag_set('fflag_all_feat_dia_1777_ls_homepage_short'):
return render(request, 'home/home.html')
else:
return redirect(reverse('projects:project-index'))
return redirect(reverse('projects:project-index'))

Check warning on line 58 in label_studio/core/views.py

View check run for this annotation

Codecov / codecov/patch

label_studio/core/views.py#L58

Added line #L58 was not covered by tests

# not authenticated
return redirect(reverse('user-login'))
Expand Down
10 changes: 2 additions & 8 deletions label_studio/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ def user_signup(request):

# checks if the URL is a safe redirection.
if not next_page or not url_has_allowed_host_and_scheme(url=next_page, allowed_hosts=request.get_host()):
if flag_set('fflag_all_feat_dia_1777_ls_homepage_short'):
next_page = reverse('main')
else:
next_page = reverse('projects:project-index')
next_page = reverse('projects:project-index')

user_form = forms.UserSignupForm()
organization_form = OrganizationSignupForm()
Expand Down Expand Up @@ -104,10 +101,7 @@ def user_login(request):

# checks if the URL is a safe redirection.
if not next_page or not url_has_allowed_host_and_scheme(url=next_page, allowed_hosts=request.get_host()):
if flag_set('fflag_all_feat_dia_1777_ls_homepage_short'):
next_page = reverse('main')
else:
next_page = reverse('projects:project-index')
next_page = reverse('projects:project-index')

login_form = load_func(settings.USER_LOGIN_FORM)
form = login_form()
Expand Down
1 change: 0 additions & 1 deletion web/.stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"selector-class-pattern": null,
"custom-property-pattern": null,
"no-descending-specificity": null,
"function-no-unknown": null,
"scss/no-global-function-names": null,
"scss/function-no-unknown": null,
"selector-pseudo-class-no-unknown": [
Expand Down
11 changes: 0 additions & 11 deletions web/apps/labelstudio/src/app/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,9 @@ import { FF_OPTIC_2, FF_UNSAVED_CHANGES, FF_PRODUCT_TOUR, isFF } from "../utils/
import { TourProvider } from "@humansignal/core";
import { ToastProvider, ToastViewport } from "@humansignal/ui";
import "@humansignal/ui/src/tailwind.css";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { JotaiProvider, JotaiStore } from "../utils/jotai-store";

const baseURL = new URL(APP_SETTINGS.hostname || location.origin);
export const UNBLOCK_HISTORY_MESSAGE = "UNBLOCK_HISTORY";
const queryClient = new QueryClient({
defaultOptions: {
queries: {
refetchOnWindowFocus: false,
},
},
});

const browserHistory = createBrowserHistory({
basename: baseURL.pathname || "/",
Expand Down Expand Up @@ -66,8 +57,6 @@ const App = ({ content }) => {
<Router history={browserHistory}>
<MultiProvider
providers={[
<JotaiProvider key="jotai" store={JotaiStore} />,
<QueryClientProvider key="query" client={queryClient} />,
<AppStoreProvider key="app-store" />,
<ApiProvider key="api" />,
<ConfigProvider key="config" />,
Expand Down
4 changes: 1 addition & 3 deletions web/apps/labelstudio/src/components/Menubar/Menubar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import "./Menubar.scss";
import "./MenuContent.scss";
import "./MenuSidebar.scss";
import { ModelsPage } from "../../pages/Organization/Models/ModelsPage";
import { FF_DIA_835, FF_HOMEPAGE, isFF } from "../../utils/feature-flags";
import { IconHome } from "@humansignal/ui";
import { FF_DIA_835, isFF } from "../../utils/feature-flags";

export const MenubarContext = createContext();

Expand Down Expand Up @@ -184,7 +183,6 @@ export const Menubar = ({ enabled, defaultOpened, defaultPinned, children, onSid
style={{ width: 240 }}
>
<Menu>
{isFF(FF_HOMEPAGE) && <Menu.Item label="Home" to="/" icon={<IconHome />} data-external exact />}
<Menu.Item label="Projects" to="/projects" icon={<IconFolder />} data-external exact />
<Menu.Item label="Organization" to="/organization" icon={<IconPersonInCircle />} data-external exact />
{isFF(FF_DIA_835) && <Menu.Item label="Models" to={ModelsPage.path} icon={<IconModel />} exact />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const ProjectName = ({ name, setName, onSaveName, onSubmit, error, description,
</form>
);

export const CreateProject = ({ onClose, redirect = true }) => {
export const CreateProject = ({ onClose }) => {
const [step, _setStep] = React.useState("name"); // name | import | config
const [waiting, setWaitingStatus] = React.useState(false);

Expand Down Expand Up @@ -173,9 +173,9 @@ export const CreateProject = ({ onClose, redirect = true }) => {
},
});
setWaitingStatus(false);
redirect && history.replace("/projects");
history.replace("/projects");
onClose?.();
}, [project, redirect]);
}, [project]);

return (
<Modal onHide={onDelete} closeOnClickOutside={false} allowToInterceptEscape fullscreen visible bare>
Expand Down
213 changes: 0 additions & 213 deletions web/apps/labelstudio/src/pages/Home/HomePage.tsx

This file was deleted.

Loading
Loading