Projects overhaul for creators (#827)

* Projects page

* Continue work on bulk edit

* editLinks is now bulkEdit

* Bulk Edit Links completed

* Edit URL clear fields.

* Create project button + other bulk buttons.

* Pagination (w/o reactivity.)

* Apply suggestions from code review

Co-authored-by: triphora <emmaffle@modrinth.com>

* Sorting fixed, broken page count though?

* Only make editable projects selectable + remove delete button

* Shorthand

* Start using computed

* Fix pagination

* Add Pagination Switching

* Final Style Changes

* Cleanup

* Action Affects dropdown

* Switch to checkbox swizzle

* Projects dashboard, the most hellish thing I have ever worked on

* Rewrite project dashboard without tables

* why's that there

* Fix mod message icon

* New project settings page

* Remove extra slash

* Bulk project route and improve styling of links UI

* Remove beta label from Monetization

* Relevant page links in project settings

* Don't vertically center header rows

* Improve error messages, add remove project icon button, add saving feedback, begin project checklist, fix license settings

* Remove contextual link from project settings, disable WIP checklist

* Fix bulk edit

* Project checklist, add featured gallery image to project pages, fix random bugs

* Remove old check

* Remove icon border on grid mode and hide project status card when unnecessary

* Fix build

* Make checklist progress smaller and add collapsing

* Remove uneven gap on nav cards

* Improve wrapping of checklist

* Replace project settings header link with status

* Fix bugs + status stuff

* Fix warns + compile error

* Update wording

* Hide environment type nag for project types without it

* Make member dropdown match

Co-authored-by: mineblock11 <93472213+mineblock11@users.noreply.github.com>
Co-authored-by: triphora <emmaffle@modrinth.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Prospector
2023-01-07 17:37:47 -08:00
committed by GitHub
parent 1d8c80c062
commit 212bb33142
48 changed files with 4085 additions and 1940 deletions

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="21" y1="6" x2="3" y2="6"></line>
<line x1="15" y1="12" x2="3" y2="12"></line>
<line x1="17" y1="18" x2="3" y2="18"></line>
</svg>

After

Width:  |  Height:  |  Size: 328 B

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 6v12"></path>
<path d="M17.196 9 6.804 15"></path>
<path d="m6.804 9 10.392 6"></path>
</svg>

After

Width:  |  Height:  |  Size: 295 B

View File

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>

After

Width:  |  Height:  |  Size: 238 B

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="8" cy="8" r="6"></circle>
<path d="M18.09 10.37A6 6 0 1 1 10.34 18"></path>
<path d="M7 6h1v4"></path>
<path d="m16.71 13.88.7.71-2.82 2.82"></path>
</svg>

After

Width:  |  Height:  |  Size: 358 B

View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="10"></circle>
<path d="M15 9.354a4 4 0 1 0 0 5.292"></path>
</svg>

After

Width:  |  Height:  |  Size: 280 B

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="9" y1="18" x2="15" y2="18"></line>
<line x1="10" y1="22" x2="14" y2="22"></line>
<path d="M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"></path>
</svg>

After

Width:  |  Height:  |  Size: 419 B

View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path>
<path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path>
</svg>

After

Width:  |  Height:  |  Size: 350 B

View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="22" y1="2" x2="11" y2="13"></line>
<polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
</svg>

After

Width:  |  Height:  |  Size: 293 B

View File

@@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<path
d="M7 7H7.01M7 3H12C12.5119 2.99999 13.0237 3.19525 13.4142 3.58579L20.4143 10.5858C21.1953 11.3668 21.1953 12.6332 20.4143 13.4142L13.4142 20.4142C12.6332 21.1953 11.3668 21.1953 10.5858 20.4142L3.58579 13.4142C3.19526 13.0237 3 12.5118 3 12V7C3 4.79086 4.79086 3 7 3Z"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2Z"></path>
<path d="M7 7h.01"></path>
</svg>

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 320 B

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M9 5H2v7l6.29 6.29c.94.94 2.48.94 3.42 0l3.58-3.58c.94-.94.94-2.48 0-3.42L9 5Z"></path>
<path d="M6 9.01V9"></path>
<path d="m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19"></path>
</svg>

After

Width:  |  Height:  |  Size: 378 B

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<line x1="19" y1="8" x2="19" y2="14"></line>
<line x1="22" y1="11" x2="16" y2="11"></line>
</svg>

After

Width:  |  Height:  |  Size: 386 B

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<line x1="17" y1="8" x2="22" y2="13"></line>
<line x1="22" y1="8" x2="17" y2="13"></line>
</svg>

After

Width:  |  Height:  |  Size: 385 B

View File

@@ -1,3 +1,478 @@
/*
Base components
*/
.multiselect--above .multiselect__content-wrapper {
border-top: none !important;
border-top-left-radius: var(--size-rounded-card) !important;
border-top-right-radius: var(--size-rounded-card) !important;
}
.known-error .multiselect__tags {
border-color: var(--color-special-red) !important;
background-color: var(--color-warning-bg) !important;
&::placeholder {
color: var(--color-warning-text);
}
}
.multiselect {
color: var(--color-text) !important;
outline: 2px solid transparent;
input {
background: transparent;
box-shadow: none;
}
input::placeholder {
color: var(--color-text);
}
.multiselect__tags {
border-radius: var(--size-rounded-sm);
background: var(--color-dropdown-bg);
box-shadow: var(--shadow-inset-sm);
border: none;
cursor: pointer;
padding-left: 7px;
padding-top: 10px;
transition: background-color 0.1s ease-in-out;
&:active {
background: var(--color-button-bg-hover);
.multiselect__spinner {
background: var(--color-button-bg-hover);
}
}
.multiselect__single {
background: transparent;
}
.multiselect__tag {
border-radius: var(--size-rounded-sm);
color: var(--color-text-dark);
background: transparent;
border: 2px solid var(--color-brand);
}
.multiselect__tag-icon {
background: transparent;
&:after {
color: var(--color-text-dark);
}
}
.multiselect__placeholder {
color: var(--color-button-text);
margin-left: 8px;
opacity: 0.6;
font-size: 16px;
line-height: 20px;
}
}
.multiselect__content-wrapper {
background: var(--color-dropdown-bg);
border: none;
overflow-x: hidden;
border-bottom-left-radius: var(--size-rounded-sm);
border-bottom-right-radius: var(--size-rounded-sm);
box-shadow: var(--shadow-inset-sm), var(--shadow-floating);
.multiselect__element {
.multiselect__option--highlight {
background: var(--color-button-bg-active);
color: var(--color-text-dark);
}
.multiselect__option--selected {
background: var(--color-brand);
font-weight: bold;
color: var(--color-brand-inverted);
}
}
}
.multiselect__spinner {
background: var(--color-dropdown-bg);
&:active {
background: var(--color-button-bg-hover);
}
}
&.multiselect--disabled {
background: none;
.multiselect__current,
.multiselect__select {
background: none;
}
}
}
.grid-display {
display: grid;
grid-gap: var(--spacing-card-md);
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
.grid-display__item {
display: flex;
flex-grow: 1;
flex-direction: column;
justify-content: flex-start;
background-color: var(--color-bg);
border-radius: var(--size-rounded-card);
padding: var(--spacing-card-lg);
gap: var(--spacing-card-md);
.label {
color: var(--color-heading);
font-weight: bold;
font-size: 1rem;
}
.value {
color: var(--color-text-dark);
font-weight: bold;
font-size: 2rem;
}
.goto-link {
margin-top: auto;
}
}
&.width-12 {
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}
&.width-16 {
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
}
/*
Cards and body styling
*/
.base-card {
@extend .padding-lg;
position: relative;
min-height: var(--font-size-2xl);
background-color: var(--color-raised-bg);
border-radius: var(--size-rounded-card);
margin-bottom: var(--spacing-card-md);
outline: 2px solid transparent;
box-shadow: var(--shadow-card);
.card__overlay {
position: absolute;
top: 1rem;
right: 1rem;
display: flex;
flex-direction: column;
align-items: flex-end;
grid-gap: 0.5rem;
z-index: 2;
}
&.warning {
border-left: 0.5rem solid var(--color-banner-side);
padding: 1.5rem;
line-height: 1.5;
background-color: var(--color-banner-bg);
color: var(--color-banner-text);
min-height: 0;
a {
/* Uses active color to increase contrast */
color: var(--color-link-active);
text-decoration: underline;
}
}
}
.universal-labels {
label,
.label {
:where(.label__title) {
display: block;
margin-block: var(--spacing-card-md) var(--spacing-card-sm);
// Same styling as h3
color: var(--color-text-dark);
font-size: 1.17rem;
font-weight: bold;
.required {
color: var(--color-special-red);
}
&.size-card-header {
font-size: var(--font-size-xl);
margin-bottom: 1rem;
}
}
:where(.label__description) {
display: block;
margin-block-end: var(--spacing-card-sm);
.label__subdescription {
display: block;
margin-block-start: var(--spacing-card-md);
}
}
:where(h1, h2, h3, h4) {
margin-block: 0;
}
}
}
.padding-lg {
padding: var(--spacing-card-lg);
}
.padding-bg {
padding: var(--spacing-card-bg);
}
.padding-md {
padding: var(--spacing-card-md);
}
.padding-sm {
padding: var(--spacing-card-sm);
}
.padding-0 {
padding: 0;
}
.padding-block-lg {
padding-block: var(--spacing-card-lg);
}
.padding-block-bg {
padding-block: var(--spacing-card-bg);
}
.padding-block-md {
padding-block: var(--spacing-card-md);
}
.padding-block-sm {
padding-block: var(--spacing-card-sm);
}
.padding-block-0 {
padding-block: 0;
}
.padding-inline-lg {
padding-inline: var(--spacing-card-lg);
}
.padding-inline-bg {
padding-inline: var(--spacing-card-bg);
}
.padding-inline-md {
padding-inline: var(--spacing-card-md);
}
.padding-inline-sm {
padding-inline: var(--spacing-card-sm);
}
.padding-inline-0 {
padding-inline: 0;
}
.universal-body {
@extend .universal-labels;
.multiselect {
width: 15rem;
}
> :where(input + *, .input-group + *, .textarea-wrapper + *, .chips
+ *, .resizable-textarea-wrapper + *, .input-div + *) {
margin-block-start: var(--spacing-card-md);
}
:where(button, .button, .iconified-button) {
width: fit-content;
}
.input-group {
input {
width: auto;
flex-basis: 0;
}
}
:where(input) {
box-sizing: border-box;
max-height: 40px;
width: 24rem;
flex-basis: 24rem;
&:not(.stylized-toggle) {
max-width: 100%;
}
}
:where(.adjacent-input, &.adjacent-input) {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
gap: var(--spacing-card-sm);
margin-bottom: calc(var(--spacing-card-sm) + var(--spacing-card-md));
.iconified-button,
.input-group {
flex-shrink: 0;
}
input {
flex-shrink: 1;
}
> :first-child {
flex-shrink: 2;
flex-grow: 1;
flex-basis: min-content;
}
label,
.label {
.label__title {
margin-block: 0;
}
.label__description {
margin-block-end: 0;
}
.label__description:not(:first-child) {
margin-top: var(--spacing-card-sm);
}
}
@media screen and (max-width: 750px) {
&:not(&.small) {
flex-direction: column;
align-items: start;
.stylized-toggle {
flex-basis: 0;
}
}
}
}
h1 {
display: flex;
align-items: center;
}
> :first-child {
margin-block-start: 0;
}
> :last-child {
margin-block-end: 0;
}
:where(.header__row) {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: var(--spacing-card-sm);
* {
flex-shrink: 0;
}
.header__title {
margin: 0;
flex-grow: 1;
}
&:not(:last-child) {
margin-bottom: var(--spacing-card-md);
}
}
> .label:first-child :where(> :first-child, .label__title),
> label:first-child :where(> :first-child, .label__title),
> .adjacent-input:first-child :where(> :first-child, .label__title) {
margin-block-start: 0;
}
}
.universal-card {
@extend .base-card;
@extend .universal-body;
}
.universal-modal {
@extend .universal-body;
padding: var(--spacing-card-bg);
display: flex;
flex-direction: column;
> p:first-child {
margin-top: 0;
}
@media screen and (max-width: 750px) {
.adjacent-input,
&.adjacent-input &:not(&.small) {
flex-direction: row;
align-items: center;
}
}
@media screen and (max-width: calc(600px + 2rem)) {
.adjacent-input,
&.adjacent-input &:not(&.small) {
flex-direction: column;
align-items: start;
}
}
}
.navigation-card {
@extend .base-card;
@extend .padding-inline-lg;
@extend .padding-block-md;
align-items: center;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
row-gap: 0.5rem;
}
/*
Other
*/
// Here lies 𝖄𝖊 𝕸𝖆𝖗𝖌𝖎𝖓 𝕸𝖆𝖌𝖎𝖈
// which allows to have just one wrapper div
.iconified-input {
@@ -551,6 +1026,11 @@ tr.button-transparent {
--text-color: var(--color-brand-inverted);
}
.moderation-button {
--background-color: var(--color-special-orange);
--text-color: var(--color-brand-inverted);
}
.brand-button {
--background-color: var(--color-brand);
--text-color: var(--color-brand-inverted);
@@ -840,22 +1320,23 @@ tr.button-transparent {
}
.vue-notification {
background: #44a4fc;
border-left: 5px solid #44a4fc;
background: var(--color-special-blue);
border-left: 5px solid var(--color-special-blue);
color: var(--color-brand-inverted);
&.success {
background: #68cd86;
border-left-color: #68cd86;
background: var(--color-special-green);
border-left-color: var(--color-special-green);
}
&.warn {
background: #ffb648;
border-left-color: #ffb648;
background: var(--color-special-orange);
border-left-color: var(--color-special-orange);
}
&.error {
background: #e54d42;
border-left-color: #e54d42;
background: var(--color-special-red);
border-left-color: var(--color-special-red);
}
}
@@ -977,214 +1458,6 @@ h3 {
}
}
.base-card {
@extend .padding-lg;
position: relative;
min-height: var(--font-size-2xl);
background-color: var(--color-raised-bg);
border-radius: var(--size-rounded-card);
margin-bottom: var(--spacing-card-md);
outline: 2px solid transparent;
box-shadow: var(--shadow-card);
.card__overlay {
position: absolute;
top: 1rem;
right: 1rem;
display: flex;
flex-direction: column;
align-items: flex-end;
grid-gap: 0.5rem;
z-index: 2;
}
&.warning {
border-left: 0.5rem solid var(--color-banner-side);
padding: 1.5rem;
line-height: 1.5;
background-color: var(--color-banner-bg);
color: var(--color-banner-text);
min-height: 0;
a {
/* Uses active color to increase contrast */
color: var(--color-link-active);
text-decoration: underline;
}
}
}
.universal-labels {
label,
.label {
.label__title {
display: block;
margin-block: var(--spacing-card-md) var(--spacing-card-sm);
// Same styling as h3
color: var(--color-text-dark);
font-size: 1.17em;
font-weight: bold;
.required {
color: var(--color-special-red);
}
}
.label__description {
display: block;
margin-block-end: var(--spacing-card-sm);
.label__subdescription {
display: block;
margin-block-start: var(--spacing-card-md);
}
}
}
}
.padding-lg {
padding: var(--spacing-card-lg);
}
.padding-bg {
padding: var(--spacing-card-bg);
}
.padding-md {
padding: var(--spacing-card-md);
}
.padding-sm {
padding: var(--spacing-card-sm);
}
.padding-block-lg {
padding-block: var(--spacing-card-lg);
}
.padding-block-bg {
padding-block: var(--spacing-card-bg);
}
.padding-block-md {
padding-block: var(--spacing-card-md);
}
.padding-block-sm {
padding-block: var(--spacing-card-sm);
}
.padding-inline-lg {
padding-inline: var(--spacing-card-lg);
}
.padding-inline-bg {
padding-inline: var(--spacing-card-bg);
}
.padding-inline-md {
padding-inline: var(--spacing-card-md);
}
.padding-inline-sm {
padding-inline: var(--spacing-card-sm);
}
.universal-card {
@extend .base-card;
@extend .universal-labels;
.multiselect {
width: 15rem;
}
> :where(input + *, .input-group + *) {
margin-block-start: var(--spacing-card-md);
}
.input-group {
.multiselect,
input {
width: auto;
flex-basis: 0;
}
}
button,
.button,
.iconified-button {
width: fit-content;
}
input {
box-sizing: border-box;
max-height: 40px;
width: 24rem;
flex-basis: 24rem;
&:not(.stylized-toggle) {
max-width: 100%;
}
}
.adjacent-input,
&.adjacent-input {
display: flex;
flex-direction: row;
align-items: center;
.iconified-button,
.input-group {
flex-shrink: 0;
}
input {
flex-shrink: 1;
}
> :first-child {
flex-shrink: 2;
flex-grow: 1;
margin-right: var(--spacing-card-md);
}
@media screen and (max-width: 750px) {
&:not(&.small) {
flex-direction: column;
align-items: start;
margin-bottom: var(--spacing-card-sm);
.stylized-toggle {
flex-basis: 0;
}
> :first-child {
margin-right: 0;
margin-bottom: var(--spacing-card-md);
}
}
}
}
h1 {
display: flex;
align-items: center;
}
> :first-child {
margin-block-start: 0;
}
> :last-child {
margin-block-end: 0;
}
}
.push-right {
margin-left: auto;
margin-right: 0;
@@ -1206,31 +1479,6 @@ button {
}
}
.header-card {
@extend .universal-card;
.header__row {
display: flex;
flex-direction: row;
align-items: center;
flex-wrap: wrap;
gap: var(--spacing-card-sm);
* {
flex-shrink: 0;
}
.header__title {
margin: 0;
flex-grow: 1;
}
&:not(:last-child) {
margin-bottom: var(--spacing-card-md);
}
}
}
.legacy-label-styles {
label {
display: flex;
@@ -1298,6 +1546,32 @@ button {
input {
flex-shrink: 2;
}
&.shrink-first {
:first-child {
flex-shrink: 2;
flex-grow: 1;
flex-basis: min-content;
}
:not(:first-child) {
flex-shrink: 1;
}
}
}
.input-stack {
display: flex;
flex-direction: column;
> * {
margin-bottom: var(--spacing-card-sm);
}
> .multiselect {
width: unset;
height: inherit;
}
}
.text-input-wrapper {
@@ -1414,6 +1688,14 @@ button {
}
}
.wrap-as-needed {
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
-webkit-hyphens: auto;
hyphens: auto;
}
.sr-only {
position: absolute;
width: 0;

View File

@@ -76,7 +76,7 @@ html {
--color-hr: var(--color-text);
--color-table-border: #dfe2e5;
--color-table-alternate-row: #f6f8fa;
--color-table-alternate-row: #f2f4f7;
--shadow-inset-lg: inset 0px -2px 2px hsla(221, 39%, 11%, 0.1);
--shadow-inset: inset 0px -2px 2px hsla(221, 39%, 11%, 0.05);
@@ -204,7 +204,7 @@ html {
--color-hr: var(--color-text);
--color-table-border: #4f5864;
--color-table-alternate-row: #262a30;
--color-table-alternate-row: #202228;
--shadow-inset-lg: inset 0px -2px 2px hsla(221, 39%, 11%, 0.1);
--shadow-inset: inset 0px -2px 2px hsla(221, 39%, 11%, 0.05);