Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Forms have no Markdown Box #24398

Closed
JakobDev opened this issue Apr 28, 2023 · 0 comments · Fixed by #24400
Closed

Issue Forms have no Markdown Box #24398

JakobDev opened this issue Apr 28, 2023 · 0 comments · Fixed by #24400
Labels
topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality

Comments

@JakobDev
Copy link
Contributor

Description

If you use a Issue Form, the Teextarea are normal Textareas and not a Markdown Box.

Just create a new Issue For by creating .gitea/ISSUE_TEMPLATE/bug.yaml with this content:

name: Bug
description: Write a Bug report
labels: [Bug]
body:
  - type: textarea
    id: bug_description
    attributes:
        label: Describe the bug
        description: A clear description what the Bug is
    validations:
        required: true

You can enter Markdown in the Textarea and it will be rendered, but on the Form it's just a normal Textarea and not a Markdown Box, so you missing Features like a Preview.

This Problem is also noted in the Code, but there is no Bug Report yet.

<div class="field">
{{template "repo/issue/fields/header" .}}
{{/* FIXME: preview markdown result */}}
{{/* FIXME: required validation for markdown editor */}}
<textarea name="form-field-{{.item.ID}}" placeholder="{{.item.Attributes.placeholder}}" {{if and .item.Validations.required .item.Attributes.render}}required{{end}}>{{.item.Attributes.value}}</textarea>
</div>

Gitea Version

bb25f85

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

grafik

Git Version

No response

Operating System

No response

How are you running Gitea?

Build from source

Database

None

@silverwind silverwind added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/enhancement An improvement of existing functionality topic/ui Change the appearance of the Gitea UI and removed type/bug type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Apr 28, 2023
silverwind added a commit that referenced this issue May 8, 2023
Fixes #24398

Task:
- [x] Reusing "textarea" like GitHub seems more friendly to users.
- [x] ^V image pasting and file uploading handling.

<details><summary>screenshots</summary>


![image](https://user-images.githubusercontent.com/18380374/235418877-00090552-ebda-411c-8e39-b47246bc8746.png)

![image](https://user-images.githubusercontent.com/18380374/235419073-dc33cad7-7626-4bce-9161-eb205c7384b5.png)
Display only one markdown editor:

![image](https://user-images.githubusercontent.com/18380374/235419098-ee21386d-2b2d-432e-bdb2-18646cc031e7.png)
Support file upload and ^V image pasting

![image](https://user-images.githubusercontent.com/18380374/235419364-7b390fa4-da56-437d-b55e-3847fbc049e7.png)

</details>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/ui Change the appearance of the Gitea UI type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants