Proposal:Add empty states to some pages #12651

Closed
opened 2025-11-02 10:17:10 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @HEREYUA on GitHub (Mar 15, 2024).

Originally assigned to: @HEREYUA on GitHub.

Feature Description

When users enter without any action, the homepage presents the following effect:

image

The activity page of personal information is as follows:

image

Is it possible to add some empty states to these pages, like this:

When users enter the homepage, they can see some prompt information

image

When a user has not set to hide page activity and there is no content, display the empty state.

image

If there are no issues, I will submit the related PR

Screenshots

No response

Originally created by @HEREYUA on GitHub (Mar 15, 2024). Originally assigned to: @HEREYUA on GitHub. ### Feature Description When users enter without any action, the homepage presents the following effect: ![image](https://github.com/go-gitea/gitea/assets/37935145/07ac2b8d-4ad5-4307-b3f9-9657822fe77a) The activity page of personal information is as follows: ![image](https://github.com/go-gitea/gitea/assets/37935145/c2bf08b3-9b2e-4b00-849d-efad1b0da823) Is it possible to add some empty states to these pages, like this: When users enter the homepage, they can see some prompt information ![image](https://github.com/go-gitea/gitea/assets/37935145/4518f74d-11f4-412b-a964-36791d3cd628) When a user has not set to hide page activity and there is no content, display the empty state. ![image](https://github.com/go-gitea/gitea/assets/37935145/abccaac6-fde5-493e-a38c-81909c562e34) If there are no issues, I will submit the related PR ### Screenshots _No response_
GiteaMirror added the type/proposaltopic/ui labels 2025-11-02 10:17:10 -06:00
Author
Owner

@silverwind commented on GitHub (Mar 15, 2024):

Sounds good, we can introduce a "blankslate" shared template that renders like this:

image
@silverwind commented on GitHub (Mar 15, 2024): Sounds good, we can introduce a "blankslate" shared template that renders like this: <img width="977" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/94053474-7ffa-43ae-9a96-3039110fbc93">
Author
Owner

@silverwind commented on GitHub (Mar 15, 2024):

Idea for arguments to the shared template:

  • Icon=string - svg name, default empty string means no icon
  • Title=string - title string or HTML template
  • Description=string - description string or HTML template
  • Classes=string - additional classes
  • Background=boolean - whether to render background and border
@silverwind commented on GitHub (Mar 15, 2024): Idea for arguments to the shared template: - Icon=string - svg name, default empty string means no icon - Title=string - title string or HTML template - Description=string - description string or HTML template - Classes=string - additional classes - Background=boolean - whether to render background and border
Author
Owner

@denyskon commented on GitHub (Mar 17, 2024):

We already have those kinds of templates for e.g. packages or wiki which look nice

@denyskon commented on GitHub (Mar 17, 2024): We already have those kinds of templates for e.g. packages or wiki which look nice
Author
Owner

@lunny commented on GitHub (Mar 18, 2024):

Idea for arguments to the shared template:

* Icon=string - svg name, default empty string means no icon

* Title=string - title string or HTML template

* Description=string - description string or HTML template

* Classes=string - additional classes

* Background=boolean - whether to render background and border

I don't think we should share them. Most of them should be a short code and have different content and conditions. It's unnecessary to share them.

@lunny commented on GitHub (Mar 18, 2024): > Idea for arguments to the shared template: > > * Icon=string - svg name, default empty string means no icon > > * Title=string - title string or HTML template > > * Description=string - description string or HTML template > > * Classes=string - additional classes > > * Background=boolean - whether to render background and border I don't think we should share them. Most of them should be a short code and have different content and conditions. It's unnecessary to share them.
Author
Owner

@silverwind commented on GitHub (Mar 18, 2024):

I don't think we should share them. Most of them should be a short code and have different content and conditions. It's unnecessary to share them.

We have to at least share a class for common styling, or do it via tailwind which would make a shared template more ideal to keep the elements in-sync.

I'm still in favor of a shared template, we have to reduce all the copy-paste in templates.

@silverwind commented on GitHub (Mar 18, 2024): > I don't think we should share them. Most of them should be a short code and have different content and conditions. It's unnecessary to share them. We have to at least share a class for common styling, or do it via tailwind which would make a shared template more ideal to keep the elements in-sync. I'm still in favor of a shared template, we have to reduce all the copy-paste in templates.
Author
Owner

@lunny commented on GitHub (Mar 19, 2024):

I don't think we should share them. Most of them should be a short code and have different content and conditions. It's unnecessary to share them.

We have to at least share a class for common styling, or do it via tailwind which would make a shared template more ideal to keep the elements in-sync.

I'm still in favor of a shared template, we have to reduce all the copy-paste in templates.

If the template is too short. The invoke code maybe the same size as the shared template. It introduced new knowledge but maybe not bring obvious benefits.

@lunny commented on GitHub (Mar 19, 2024): > > I don't think we should share them. Most of them should be a short code and have different content and conditions. It's unnecessary to share them. > > We have to at least share a class for common styling, or do it via tailwind which would make a shared template more ideal to keep the elements in-sync. > > I'm still in favor of a shared template, we have to reduce all the copy-paste in templates. If the template is too short. The invoke code maybe the same size as the shared template. It introduced new knowledge but maybe not bring obvious benefits.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12651