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

Supported org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:1.0.0-pre.0.635 #2827

Draft
wants to merge 47 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
9463f76
Update all non-major dependencies (except core Kotlin)
renovate[bot] Oct 23, 2023
8ea5a2b
Update yarn.lock
github-actions[bot] Oct 23, 2023
20c9a75
upgraded neo4j libs with cpg
nulls Oct 23, 2023
8858eee
Merge branch 'master' into renovate/all-minor-patch
nulls Oct 23, 2023
1980481
detektAll
nulls Oct 23, 2023
d1d23b9
removed usage VFC
nulls Oct 23, 2023
bcaaf89
support new routing
nulls Oct 23, 2023
4ddb6ed
diktatFix
nulls Oct 23, 2023
cbf310a
fixed renaming
nulls Oct 23, 2023
ed449a7
renamed `FC<Props> = FC {` to `FC {`
nulls Oct 24, 2023
febe2e5
fixed Location and require
nulls Oct 24, 2023
022b52a
diktatFix
nulls Oct 24, 2023
50c475d
diktatFix 2
nulls Oct 24, 2023
4a4614e
diktatFix 3
nulls Oct 24, 2023
00202f2
fixed child and missed location
nulls Oct 24, 2023
8e76268
try to fix router on index
nulls Oct 24, 2023
b409fcb
try to fix router on index
nulls Oct 24, 2023
02ad97f
small refactoring of routes
nulls Oct 24, 2023
eeb2405
diktatFix
nulls Oct 24, 2023
26044c7
another try
nulls Oct 24, 2023
2ef6429
diktatFix
nulls Oct 24, 2023
16e585e
A single props for all top level FC
nulls Oct 25, 2023
6ba480b
Merge remote-tracking branch 'origin/master' into renovate/all-minor-…
nulls Oct 25, 2023
89fe70d
removed duplicate method
nulls Oct 25, 2023
f06ee87
Merge remote-tracking branch 'origin/master' into renovate/all-minor-…
nulls Oct 25, 2023
79bb2ab
WIP
nulls Oct 25, 2023
ed48da4
set basename
nulls Oct 25, 2023
9c9e06d
WIP
nulls Oct 25, 2023
5819340
fixed routing
nulls Oct 26, 2023
e093d94
diktatFix
nulls Oct 26, 2023
354996a
diktatFix
nulls Oct 26, 2023
913e01a
removed ErrorBoundary + detekt
nulls Oct 26, 2023
d1cb0cd
Merge remote-tracking branch 'origin/master' into renovate/all-minor-…
nulls Oct 26, 2023
eeb0660
try to fix tests
nulls Oct 26, 2023
98ba7df
removed invalid import in test
nulls Oct 26, 2023
69f6e4d
a try to fix tests
nulls Oct 26, 2023
86ebd7f
downgraded kotlin-wrappers-bom
nulls Oct 31, 2023
7003d04
Update yarn.lock
github-actions[bot] Oct 31, 2023
a4e52d4
Merge remote-tracking branch 'origin/master' into feature/support-kot…
nulls Oct 31, 2023
475e45a
Update yarn.lock
github-actions[bot] Oct 31, 2023
a2db061
WIP
nulls Nov 1, 2023
eb4f409
removed extra imports
nulls Nov 1, 2023
b3304c5
mock initI18n for tests
nulls Nov 1, 2023
4a4ec83
Update save-frontend/src/test/kotlin/com/saveourtool/save/frontend/Ba…
nulls Nov 1, 2023
203d45a
Merge remote-tracking branch 'origin/master' into feature/support-kot…
nulls Nov 1, 2023
960c2d2
fixed import issue + warning in gradle
nulls Nov 1, 2023
0847dfc
try to fix a test
nulls Nov 13, 2023
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 gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ okio = "3.3.0"
serialization = "1.6.0"
kotlinx-datetime = "0.4.1"
kotlinx-coroutines = "1.7.3"
kotlin-wrappers = "1.0.0-pre.634"
kotlin-wrappers = "1.0.0-pre.635"
spring-boot = "2.7.17"
spring-cloud = "3.1.8"
spring-cloud-kubernetes = "2.1.8"
Expand Down
54 changes: 35 additions & 19 deletions save-frontend/src/main/kotlin/com/saveourtool/save/frontend/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@

package com.saveourtool.save.frontend

import com.saveourtool.save.frontend.components.*
import com.saveourtool.save.frontend.components.basic.cookieBanner
import com.saveourtool.save.frontend.components.basic.scrollToTopButton
import com.saveourtool.save.frontend.components.errorView
import com.saveourtool.save.frontend.components.footer
import com.saveourtool.save.frontend.components.requestModalHandler
import com.saveourtool.save.frontend.components.topbar.topBarComponent
import com.saveourtool.save.frontend.externals.i18next.initI18n
import com.saveourtool.save.frontend.externals.modal.ReactModal
import com.saveourtool.save.frontend.routing.basicRouting
import com.saveourtool.save.frontend.routing.createBasicRoutes
import com.saveourtool.save.frontend.utils.*
import com.saveourtool.save.info.UserInfo
import com.saveourtool.save.validation.FrontendRoutes

import js.core.jso
import react.*
import react.dom.client.createRoot
import react.dom.html.ReactHTML.div
import react.router.dom.BrowserRouter
import react.router.Outlet
import react.router.dom.RouterProvider
import react.router.dom.createBrowserRouter
import web.cssom.ClassName
import web.dom.document
import web.html.HTMLElement
Expand Down Expand Up @@ -48,32 +53,43 @@ val App: FC<Props> = FC {
}
}
}
BrowserRouter {
basename = "/"

val root = FC {
requestModalHandler {
this.userInfo = userInfo
div {
className = ClassName("d-flex flex-column")
id = "content-wrapper"
ErrorBoundary::class.react {
topBarComponent { this.userInfo = userInfo }
div {
className = ClassName("container-fluid")
id = "common-save-container"
basicRouting {
this.userInfo = userInfo
this.userInfoSetter = setUserInfo
}
}
if (kotlinx.browser.window.location.pathname != "/${FrontendRoutes.COOKIE}") {
cookieBanner { }
}
footer { }
topBarComponent { this.userInfo = userInfo }
div {
className = ClassName("container-fluid")
id = "common-save-container"
Outlet()
}
if (window.location.pathname != "/${FrontendRoutes.COOKIE}") {
cookieBanner { }
}
footer { }
}
}
scrollToTopButton()
}

RouterProvider {
router = createBrowserRouter(
routes = arrayOf(
jso {
path = "/"
element = root.create()
errorElement = errorView.create()
children = createBasicRoutes(userInfo, setUserInfo)
}
),
opts = jso {
basename = "/"
}
)
}
}

fun main() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* A page for errors
*/

package com.saveourtool.save.frontend.components

import com.saveourtool.save.frontend.components.topbar.topBarComponent
import com.saveourtool.save.frontend.components.views.FallbackView
import js.errors.JsError
import react.FC
import react.dom.html.ReactHTML.div
import react.react
import react.router.useRouteError
import web.cssom.ClassName

val errorView = FC {
val errorMessage = useRouteError().unsafeCast<JsError>().message
div {
className = ClassName("container-fluid")
topBarComponent()
FallbackView::class.react {
bigText = "Error"
smallText = "Something went wrong: $errorMessage"
}
@Suppress("EMPTY_BLOCK_STRUCTURE_ERROR")
footer { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ val topBarUserField: FC<UserInfoAwareProps> = FC { props ->
img {
className =
ClassName("ml-2 align-self-center avatar avatar-user width-full border color-bg-default rounded-circle fas mr-2")
src = props.userInfo?.avatar?.avatarRenderer() ?: AVATAR_PROFILE_PLACEHOLDER
src = userInfo.avatar?.avatarRenderer() ?: AVATAR_PROFILE_PLACEHOLDER
style = logoSize
}
} ?: fontAwesomeIcon(icon = faUser) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import web.cssom.rem
internal const val AVATAR_TITLE = "Upload avatar"

val leftSettingsColumn: FC<SettingsProps> = FC { props ->
val (avatarImgLink, setAvatarImgLink) = useState<String?>(null)
val (t) = useTranslation("profile")

div {
Expand All @@ -50,8 +49,7 @@ val leftSettingsColumn: FC<SettingsProps> = FC { props ->
className = ClassName("row justify-content-center")
img {
className = ClassName("avatar avatar-user width-full border color-bg-default rounded-circle")
src = avatarImgLink
?: props.userInfo?.avatar?.avatarRenderer()
src = props.userInfo?.avatar?.avatarRenderer()
?: AVATAR_PROFILE_PLACEHOLDER
style = jso {
height = 12.rem
Expand Down
Loading
Loading