diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml index ae2d4e51..a43a5a55 100644 --- a/.github/ISSUE_TEMPLATE/BUG_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.yml @@ -8,7 +8,7 @@ body: value: | Found a bug? Please fill out the sections below. 👍 Thanks for taking the time to fill out this bug report! - For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy) + For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy/issues/new/choose) - type: checkboxes attributes: label: Requirements diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml index 3c75050a..2d656819 100644 --- a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml @@ -1,16 +1,16 @@ name: "\U0001F680 Feature request" -description: Suggest an idea for improving Lemmy +description: Suggest an idea for improving Lemmy's UI labels: ["enhancement"] body: - type: markdown attributes: value: | Have a suggestion about Lemmy's UI? - For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy) + For backend issues, use [lemmy](https://github.com/LemmyNet/lemmy/issues/new/choose) - type: checkboxes attributes: label: Requirements - description: Before you create a bug report please do the following. + description: Before you create a feature request please do the following. options: - label: Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support required: true diff --git a/.prettierignore b/.prettierignore index e7a0d20e..98eb0d9b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ src/shared/translations -lemmy-translations \ No newline at end of file +lemmy-translations +src/assets/css/themes/*.css diff --git a/package.json b/package.json index b0d555b5..554bd234 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lemmy-ui", - "version": "0.18.0-rc.1", + "version": "0.18.0-rc.2", "description": "An isomorphic UI for lemmy", "repository": "https://github.com/LemmyNet/lemmy-ui", "license": "AGPL-3.0", diff --git a/src/assets/css/main.css b/src/assets/css/main.css index da3f7ffc..f9aa1ffb 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -84,10 +84,6 @@ margin-top: -6.5px; } -.post-title { - line-height: 1; -} - .post-title a:visited { color: var(--gray) !important; } diff --git a/src/assets/css/themes/_variables.darkly.scss b/src/assets/css/themes/_variables.darkly.scss index 56ccc3cf..fa6e305d 100644 --- a/src/assets/css/themes/_variables.darkly.scss +++ b/src/assets/css/themes/_variables.darkly.scss @@ -92,6 +92,8 @@ $input-border-color: $body-bg; $input-group-addon-color: $gray-500; $input-group-addon-bg: $gray-700; +$hr-border-color: rgba($body-color, 0.25); + $table-accent-bg: $gray-800; $table-border-color: $gray-700; diff --git a/src/assets/css/themes/_variables.litely.scss b/src/assets/css/themes/_variables.litely.scss index 2fc0fe3d..1708d4c3 100644 --- a/src/assets/css/themes/_variables.litely.scss +++ b/src/assets/css/themes/_variables.litely.scss @@ -76,3 +76,5 @@ $border-radius: 0.5rem; $border-radius-lg: 0.5rem; $border-radius-sm: 1rem; $rounded-pill: 0.25rem; + +$hr-border-color: rgba($body-color, 0.25); diff --git a/src/assets/css/themes/darkly-red.css b/src/assets/css/themes/darkly-red.css index aa82bd8e..221cc8bc 100644 --- a/src/assets/css/themes/darkly-red.css +++ b/src/assets/css/themes/darkly-red.css @@ -450,7 +450,7 @@ hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; - border-top: 1px solid rgba(0, 0, 0, 0.1); + border-top: 1px solid rgba(222, 226, 230, 0.25); } small, diff --git a/src/assets/css/themes/darkly.css b/src/assets/css/themes/darkly.css index 3d764f9c..5a289b49 100644 --- a/src/assets/css/themes/darkly.css +++ b/src/assets/css/themes/darkly.css @@ -450,7 +450,7 @@ hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; - border-top: 1px solid rgba(0, 0, 0, 0.1); + border-top: 1px solid rgba(222, 226, 230, 0.25); } small, diff --git a/src/assets/css/themes/litely-red.css b/src/assets/css/themes/litely-red.css index 05565223..187478ea 100644 --- a/src/assets/css/themes/litely-red.css +++ b/src/assets/css/themes/litely-red.css @@ -450,7 +450,7 @@ hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; - border-top: 1px solid rgba(0, 0, 0, 0.1); + border-top: 1px solid rgba(222, 226, 230, 0.25); } small, diff --git a/src/assets/css/themes/litely.css b/src/assets/css/themes/litely.css index 473cd697..6f57d01e 100644 --- a/src/assets/css/themes/litely.css +++ b/src/assets/css/themes/litely.css @@ -449,7 +449,7 @@ hr { margin-top: 1rem; margin-bottom: 1rem; border: 0; - border-top: 1px solid rgba(34, 34, 34, 0.1); + border-top: 1px solid rgba(73, 80, 87, 0.25); } small, diff --git a/src/shared/components/person/person-listing.tsx b/src/shared/components/person/person-listing.tsx index fe8b8418..045633c7 100644 --- a/src/shared/components/person/person-listing.tsx +++ b/src/shared/components/person/person-listing.tsx @@ -1,3 +1,4 @@ +import classNames from "classnames"; import { Component } from "inferno"; import { Link } from "inferno-router"; import { Person } from "lemmy-js-client"; @@ -48,7 +49,10 @@ export class PersonListing extends Component { {!this.props.realLink ? ( {this.avatarAndName(displayName)} @@ -56,7 +60,9 @@ export class PersonListing extends Component { ) : ( diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 222e4857..8e69b18e 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -201,7 +201,7 @@ export class PostListing extends Component { const post = this.postView.post; return ( -
+
{!this.state.showEdit ? ( <> {this.listing()} @@ -367,10 +367,8 @@ export class PostListing extends Component { createdLine() { const post_view = this.postView; - const url = post_view.post.url; - const body = post_view.post.body; return ( -
+

); } @@ -625,11 +616,11 @@ export class PostListing extends Component { const post = this.postView.post; return ( -
+
{this.commentsButton} {canShare() && ( ); } @@ -668,57 +669,64 @@ export class PostListing extends Component { // Possible enhancement: Priority+ pattern instead of just hard coding which get hidden behind the show more button. // Possible enhancement: Make each button a component. const post_view = this.postView; + const post = post_view.post; + return ( <> {this.saveButton} {this.crossPostButton} + {/** + * If there is a URL, or if the post has a body and we were told not to + * show the body, show the MetadataCard/body toggle. + */} + {(post.url || (post.body && !this.props.showBody)) && + this.showPreviewButton()} + {this.showBody && post_view.post.body && this.viewSourceButton} - {this.hasAdvancedButtons && ( -
- +
+ -
    - {!this.myPost ? ( - <> -
  • {this.reportButton}
  • -
  • {this.blockButton}
  • - - ) : ( - <> -
  • {this.editButton}
  • -
  • {this.deleteButton}
  • - - )} +
      + {!this.myPost ? ( + <> +
    • {this.reportButton}
    • +
    • {this.blockButton}
    • + + ) : ( + <> +
    • {this.editButton}
    • +
    • {this.deleteButton}
    • + + )} - {/* Any mod can do these, not limited to hierarchy*/} - {(amMod(this.props.moderators) || amAdmin()) && ( - <> -
    • -
      -
    • -
    • {this.lockButton}
    • - {this.featureButtons} - - )} + {/* Any mod can do these, not limited to hierarchy*/} + {(amMod(this.props.moderators) || amAdmin()) && ( + <> +
    • +
      +
    • +
    • {this.lockButton}
    • + {this.featureButtons} + + )} - {(this.canMod_ || this.canAdmin_) && ( -
    • {this.modRemoveButton}
    • - )} -
    -
- )} + {(this.canMod_ || this.canAdmin_) && ( +
  • {this.modRemoveButton}
  • + )} + +
    ); } @@ -727,7 +735,7 @@ export class PostListing extends Component { const post_view = this.postView; return ( { ); } @@ -882,10 +890,14 @@ export class PostListing extends Component { ); } diff --git a/src/shared/components/post/post-listings.tsx b/src/shared/components/post/post-listings.tsx index 00370f03..e6c7e5f6 100644 --- a/src/shared/components/post/post-listings.tsx +++ b/src/shared/components/post/post-listings.tsx @@ -96,9 +96,7 @@ export class PostListings extends Component { onAddAdmin={this.props.onAddAdmin} onTransferCommunity={this.props.onTransferCommunity} /> - {idx + 1 !== this.posts.length && ( -
    - )} + {idx + 1 !== this.posts.length &&
    } )) ) : (