-name: "\U0001F41E Bug Report"
-description: Create a report to help us improve lemmy-ui
-title: "[Bug]: "
+name: "\U0001F41E Bug report"
+description: Report a bug to help us improve Lemmy-UI.
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
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/issues/new/choose)
+ Thanks for taking the time to help improve Lemmy-UI by reporting a bug!
- type: checkboxes
attributes:
label: Requirements
- description: Before you create a bug report please do the following.
+ description: Before you create a bug report, please carefully check the following –
options:
- - label: Is this a bug report? For questions or discussions use https://lemmy.ml/c/lemmy_support
+ - label: This is a bug report, and if not, please post to https://lemmy.ml/c/lemmy_support instead.
required: true
- - label: Did you check to see if this issue already exists?
+ - label: Please [check](https://github.com/LemmyNet/lemmy-ui/issues) to see if this issue already exists.
required: true
- - label: Is this only a single bug? Do not put multiple bugs in one issue.
+ - label: It's a single bug. Do not report multiple bugs in one issue.
+ required: true
+ - label: It's a frontend issue, not a backend issue; Otherwise please create an issue on the [backend repo](https://github.com/LemmyNet/lemmy) instead.
required: true
- - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo.
- required: false
- type: textarea
id: summary
attributes:
label: Summary
- description: A summary of the bug.
+ description: Explain the bug and upload images, screenshots or videos if possible.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: |
- Describe the steps to reproduce the bug.
- The better your description is _(go 'here', click 'there'...)_ the fastest you'll get an _(accurate)_ resolution.
+ In a numbered list, walk us through the steps needed to reproduce the bug.
+ The better your description is _(go 'here', click 'there'...)_, the quicker we can fix it.
value: |
1.
2.
3.
+ 4.
validations:
required: true
- type: textarea
attributes:
label: Technical Details
description: |
- - Any browser console errors?
+ Describe your environment (OS, browser, model of smartphone, etc)
+ If relevant, also share any console errors and/or screenshots here.
validations:
required: true
- type: input
id: lemmy-ui-version
attributes:
- label: Version
- description: Which Lemmy UI version do you use? Displayed in the footer.
- placeholder: ex. 0.17.4-rc.4
+ label: Lemmy Instance Version
+ description: What's the version of the Lemmy instance where the bug can be reproduced?
+ placeholder: ex. 0.18-rc.6
validations:
required: true
- type: input
id: lemmy-instance
attributes:
label: Lemmy Instance URL
- description: Which Lemmy instance do you use? The address
- placeholder: lemmy.ml, lemmy.world, etc
+ description: What's the URL of the Lemmy instance where the bug can be reproduced?
+ placeholder: https://lemmy.ml
name: "\U0001F680 Feature request"
-description: Suggest an idea for improving Lemmy's UI
+description: Suggest an idea for Lemmy-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/issues/new/choose)
+ Thanks for taking the time to help improve Lemmy-UI by suggesting a feature!
- type: checkboxes
attributes:
label: Requirements
- description: Before you create a feature request please do the following.
+ description: Before you create a feature request, please carefully check the following –
options:
- - label: Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
+ - label: This is a feature request and not a bug report. Otherwise, please create a new [bug report](https://github.com/LemmyNet/lemmy-ui/issues/new?assignees=&labels=bug%2Ctriage&projects=&template=BUG_REPORT.yml) instead.
required: true
- - label: Did you check to see if this issue already exists?
+ - label: Please [check](https://github.com/LemmyNet/lemmy-ui/issues) to see if this request (or a similar one) already exists.
required: true
- - label: Is this only a feature request? Do not put multiple feature requests in one issue.
+ - label: It's a single feature. Please don't request multiple features in one issue.
required: true
- - label: Is this a server side (not related to the UI) issue? Use the [Lemmy back end](https://github.com/LemmyNet/lemmy) repo.
- required: false
- - type: textarea
- id: problem
- attributes:
- label: Is your proposal related to a problem?
- description: |
- Provide a clear and concise description of what the problem is.
- For example, "I'm always frustrated when..."
- validations:
- required: true
- type: textarea
id: solution
attributes:
- label: Describe the solution you'd like.
+ label: Describe the feature you'd like
description: |
- Provide a clear and concise description of what you want to happen.
+ Provide a clear and concise description of the feature. Explain why it's needed.
validations:
required: true
- - type: textarea
- id: alternatives
- attributes:
- label: Describe alternatives you've considered.
- description: |
- Let us know about other solutions you've tried or researched.
- validations:
- required: true
- - type: textarea
- id: context
- attributes:
- label: Additional context
- description: |
- Is there anything else you can add about the proposal?
- You might want to link to related issues here, if you haven't already.
+++ /dev/null
-name: "? Question"
-description: General questions about Lemmy
-title: "Question: "
-labels: ["question", "triage"]
-body:
- - type: markdown
- attributes:
- value: |
- Have a question about Lemmy's UI?
- Please check the docs first: https://join-lemmy.org/docs/en/index.html
- - type: textarea
- id: question
- attributes:
- label: Question
- description: What's the question you have about Lemmy's UI?
- validations:
- required: true
--- /dev/null
+blank_issues_enabled: false
+contact_links:
+ - name: Question
+ url: https://lemmy.ml/c/lemmy_support
+ about: Please ask and answer general questions here.
+ - name: Technical Discussion
+ url: https://github.com/LemmyNet/lemmy-ui/discussions
+ about: Please discuss technical topics with other contributors here.
+++ /dev/null
-name: "Hexbear"
-description: For hexbear issues
-labels: ["hexbear", "triage"]
-body:
- - type: textarea
- id: question
- attributes:
- label: Question
- description: What's the question you have about hexbear?
- validations:
- required: true
{
"name": "lemmy-ui",
- "version": "0.18.0-rc.6",
+ "version": "0.18.0",
"description": "An isomorphic UI for lemmy",
"repository": "https://github.com/LemmyNet/lemmy-ui",
"license": "AGPL-3.0",
showTrendingMobile: boolean;
showSidebarMobile: boolean;
subscribedCollapsed: boolean;
+ scrolled: boolean;
tagline?: string;
siteRes: GetSiteResponse;
finished: Map<CommentId, boolean | undefined>;
postsRes: { state: "empty" },
commentsRes: { state: "empty" },
trendingCommunitiesRes: { state: "empty" },
+ scrolled: true,
siteRes: this.isoData.site_res,
showSubscribedMobile: false,
showTrendingMobile: false,
search: getQueryString(queryParams),
});
+ if (!this.state.scrolled) {
+ this.setState({ scrolled: true });
+ setTimeout(() => window.scrollTo(0, 0), 0);
+ }
+
await this.fetchData();
}
const siteRes = this.state.siteRes;
if (dataType === DataType.Post) {
- switch (this.state.postsRes.state) {
+ switch (this.state.postsRes?.state) {
case "loading":
return (
<h5>
}
handlePageChange(page: number) {
+ this.setState({ scrolled: false });
this.updateUrl({ page });
- window.scrollTo(0, 0);
}
handleSortChange(val: SortType) {
+ this.setState({ scrolled: false });
this.updateUrl({ sort: val, page: 1 });
- window.scrollTo(0, 0);
}
handleListingTypeChange(val: ListingType) {
+ this.setState({ scrolled: false });
this.updateUrl({ listingType: val, page: 1 });
- window.scrollTo(0, 0);
}
handleDataTypeChange(val: DataType) {
+ this.setState({ scrolled: false });
this.updateUrl({ dataType: val, page: 1 });
- window.scrollTo(0, 0);
}
async handleAddModToCommunity(form: AddModToCommunity) {
}
}
+ async componentDidMount() {
+ await this.refetch();
+ }
+
get combined() {
const res = this.state.res;
const combined = res.state == "success" ? buildCombined(res.data) : [];
]}
viewType={CommentViewType.Flat}
finished={this.state.finished}
- noIndent
markable
showCommunity
showContext
]}
finished={this.state.finished}
viewType={CommentViewType.Flat}
- noIndent
markable
showCommunity
showContext
nodes={commentsToFlatNodes(replies)}
viewType={CommentViewType.Flat}
finished={this.state.finished}
- noIndent
markable
showCommunity
showContext
nodes={[{ comment_view: umv, children: [], depth: 0 }]}
viewType={CommentViewType.Flat}
finished={this.state.finished}
- noIndent
markable
showCommunity
showContext
finished={this.props.finished}
admins={this.props.admins}
noBorder
- noIndent
showCommunity
showContext
enableDownvotes={this.props.enableDownvotes}
createdLine() {
const post_view = this.postView;
return (
- <ul className="list-inline mb-1 text-muted small mt-2">
- <li className="list-inline-item">
- <PersonListing person={post_view.creator} />
-
- {this.creatorIsMod_ && (
- <span className="mx-1 badge text-bg-light">
- {I18NextService.i18n.t("mod")}
- </span>
- )}
- {this.creatorIsAdmin_ && (
- <span className="mx-1 badge text-bg-light">
- {I18NextService.i18n.t("admin")}
- </span>
- )}
- {post_view.creator.bot_account && (
- <span className="mx-1 badge text-bg-light">
- {I18NextService.i18n.t("bot_account").toLowerCase()}
- </span>
- )}
- {this.props.showCommunity && (
- <>
- {" "}
- {I18NextService.i18n.t("to")}{" "}
- <CommunityLink community={post_view.community} />
- </>
- )}
- </li>
+ <span className="small">
+ <PersonListing person={post_view.creator} />
+ {this.creatorIsMod_ && (
+ <span className="mx-1 badge text-bg-light">
+ {I18NextService.i18n.t("mod")}
+ </span>
+ )}
+ {this.creatorIsAdmin_ && (
+ <span className="mx-1 badge text-bg-light">
+ {I18NextService.i18n.t("admin")}
+ </span>
+ )}
+ {post_view.creator.bot_account && (
+ <span className="mx-1 badge text-bg-light">
+ {I18NextService.i18n.t("bot_account").toLowerCase()}
+ </span>
+ )}
+ {this.props.showCommunity && (
+ <>
+ {" "}
+ {I18NextService.i18n.t("to")}{" "}
+ <CommunityLink community={post_view.community} />
+ </>
+ )}
{post_view.post.language_id !== 0 && (
<span className="mx-1 badge text-bg-light">
{
)?.name
}
</span>
- )}
- <li className="list-inline-item">•</li>
- <li className="list-inline-item">
- <span>
- <MomentTime
- published={post_view.post.published}
- updated={post_view.post.updated}
- />
- </span>
- </li>
- </ul>
+ )}{" "}
+ •{" "}
+ <MomentTime
+ published={post_view.post.published}
+ updated={post_view.post.updated}
+ />
+ </span>
);
}
to={`/post/${post_view.post.id}?scrollToComments=true`}
data-tippy-content={title}
>
- <span className="me-1">
- <Icon icon="message-square" classes="me-1" inline />
- {post_view.counts.comments}
- </span>
+ <Icon icon="message-square" classes="me-1" inline />
+ {post_view.counts.comments}
{this.unreadCount && (
<span className="text-muted fst-italic">
({this.unreadCount} {I18NextService.i18n.t("new")})
const post_view = this.postView;
return (
this.state.showAdvanced && (
- <>
+ <div className="mt-3">
{this.canMod_ && (
<>
{!this.creatorIsMod_ &&
)}
</>
)}
- </>
+ </div>
)
);
}
);
}
- showMobilePreview() {
+ showBodyPreview() {
const { body, id } = this.postView.post;
return !this.showBody && body ? (
- <Link className="text-body" to={`/post/${id}`}>
+ <Link className="text-body mt-2 d-block" to={`/post/${id}`}>
<div className="md-div mb-1 preview-lines">{body}</div>
</Link>
) : (
{this.mobileThumbnail()}
{/* Show a preview of the post body */}
- {this.showMobilePreview()}
+ {this.showBodyPreview()}
{this.commentsLine(true)}
{this.userActionsLine()}
<div className="col-12">
{this.postTitleLine()}
{this.createdLine()}
+ {this.showBodyPreview()}
{this.commentsLine()}
{this.duplicatesLine()}
{this.userActionsLine()}
+import { isBrowser } from "@utils/browser";
+
export class FirstLoadService {
#isFirstLoad: boolean;
static #instance: FirstLoadService;
}
static get isFirstLoad() {
- return this.#Instance.isFirstLoad;
+ return !isBrowser() || this.#Instance.isFirstLoad;
}
}