Add AI playground and frontend layout guidelines
This commit is contained in:
1 parent
5639546990
commit
ef65acd49c
14 files changed
+1340
-5
No files matched your search
@@ -183,6 +183,454 @@ body {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.playground-page__grid {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.playground-page__body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playground-shell {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.playground-shell__sidebar {
|
||||
flex: 0 0 340px;
|
||||
min-width: 300px;
|
||||
max-width: 360px;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.playground-card {
|
||||
width: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.playground-card .ant-card-head {
|
||||
min-height: 56px;
|
||||
padding: 0 20px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.playground-card .ant-card-head-title {
|
||||
padding: 14px 0;
|
||||
}
|
||||
|
||||
.playground-card__icon-button {
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.playground-card__icon-button:hover {
|
||||
color: #1677ff !important;
|
||||
background: rgba(22, 119, 255, 0.08) !important;
|
||||
}
|
||||
|
||||
.playground-card .ant-card-body {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
padding: 16px 20px 14px;
|
||||
}
|
||||
|
||||
.playground-card__scroll {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(148, 163, 184, 0.88) transparent;
|
||||
}
|
||||
|
||||
.playground-card__scroll::-webkit-scrollbar,
|
||||
.playground-result__content::-webkit-scrollbar,
|
||||
.playground-result__blocks-scroll::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.playground-card__scroll::-webkit-scrollbar-thumb,
|
||||
.playground-result__content::-webkit-scrollbar-thumb,
|
||||
.playground-result__blocks-scroll::-webkit-scrollbar-thumb {
|
||||
background: rgba(148, 163, 184, 0.82);
|
||||
border-radius: 999px;
|
||||
border: 2px solid transparent;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.playground-card__scroll::-webkit-scrollbar-thumb:hover,
|
||||
.playground-result__content::-webkit-scrollbar-thumb:hover,
|
||||
.playground-result__blocks-scroll::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(100, 116, 139, 0.9);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.playground-card__scroll::-webkit-scrollbar-track,
|
||||
.playground-result__content::-webkit-scrollbar-track,
|
||||
.playground-result__blocks-scroll::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.playground-card--provider {
|
||||
flex: 1 1 auto;
|
||||
min-height: 180px;
|
||||
}
|
||||
|
||||
.playground-card--provider .ant-card-body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playground-card--help {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.playground-card--workspace {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.playground-card--workspace .ant-card-body,
|
||||
.playground-card--result .ant-card-body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playground-tabs,
|
||||
.playground-tabs .ant-tabs-content-holder,
|
||||
.playground-tabs .ant-tabs-content,
|
||||
.playground-tabs .ant-tabs-tabpane {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.playground-tabs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.playground-tabs .ant-tabs-nav {
|
||||
flex: 0 0 auto;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.playground-tabs .ant-tabs-content-holder {
|
||||
flex: 1 1 auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playground-tabpane {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding-right: 2px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(148, 163, 184, 0.88) transparent;
|
||||
}
|
||||
|
||||
.playground-tabpane::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.playground-tabpane::-webkit-scrollbar-thumb {
|
||||
background: rgba(148, 163, 184, 0.82);
|
||||
border-radius: 999px;
|
||||
border: 2px solid transparent;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.playground-tabpane::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(100, 116, 139, 0.9);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.playground-tabpane::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.playground-form__grid {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.playground-form__grid--bottom {
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.playground-form__grid .ant-form-item {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.playground-tabpane .ant-form {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.playground-form__actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.playground-card--request .ant-form-item {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.playground-card--request .ant-form-item-label {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.playground-card--request .ant-form-item-label > label {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.playground-card--result {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.playground-card--result .ant-card-body {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.playground-provider-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.playground-kv {
|
||||
display: grid;
|
||||
grid-template-columns: 88px minmax(0, 1fr);
|
||||
align-items: start;
|
||||
column-gap: 14px;
|
||||
row-gap: 4px;
|
||||
}
|
||||
|
||||
.playground-kv > .ant-typography:first-child {
|
||||
flex: 0 0 auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.playground-kv > .ant-typography:last-child,
|
||||
.playground-kv .playground-status-tags {
|
||||
min-width: 0;
|
||||
justify-self: end;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.playground-card--provider .ant-card-body {
|
||||
padding-top: 18px;
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.playground-card--provider .playground-kv + .playground-kv {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.playground-kv--top {
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.playground-status-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.playground-code-block {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.playground-note {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.playground-help {
|
||||
flex: 0 0 auto;
|
||||
min-height: 0;
|
||||
border-radius: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playground-help--collapsed {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.playground-help--expanded {
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
|
||||
.playground-help.ant-collapse {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.playground-help > .ant-collapse-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.playground-help .ant-collapse-header {
|
||||
padding: 14px 20px !important;
|
||||
align-items: center !important;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.playground-help .ant-collapse-content {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playground-help .ant-collapse-content-box {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(148, 163, 184, 0.88) transparent;
|
||||
padding: 12px 16px 16px !important;
|
||||
}
|
||||
|
||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar-thumb {
|
||||
background: rgba(148, 163, 184, 0.82);
|
||||
border-radius: 999px;
|
||||
border: 2px solid transparent;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(100, 116, 139, 0.9);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.playground-help .ant-collapse-content-box::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.playground-note.ant-alert {
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.playground-note .ant-alert-icon {
|
||||
margin-inline-end: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.playground-note .ant-alert-message {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.playground-note .ant-alert-description {
|
||||
font-size: 12px;
|
||||
margin-top: 6px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.playground-result__loading {
|
||||
flex: 1 1 auto;
|
||||
min-height: 180px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.playground-result__stack {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.playground-result__meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.playground-result__content,
|
||||
.playground-result__blocks .ant-card {
|
||||
border-radius: 14px;
|
||||
background: #0f172a;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
|
||||
.playground-result__content {
|
||||
flex: 1 1 auto;
|
||||
min-height: 0;
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(148, 163, 184, 0.88) transparent;
|
||||
}
|
||||
|
||||
.playground-result__content pre,
|
||||
.playground-result__blocks pre {
|
||||
margin: 0;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.playground-result__blocks {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.playground-result__blocks-scroll {
|
||||
max-height: 180px;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: rgba(148, 163, 184, 0.88) transparent;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.playground-page__header {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.playground-form__grid--bottom {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.playground-shell {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.playground-shell__sidebar {
|
||||
flex: 0 0 auto;
|
||||
min-width: 0;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.data-source-tabs-shell,
|
||||
.data-source-tabs,
|
||||
|
||||
Reference in new issue
Block a user