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

Improve textarea paste #31948

Merged
merged 2 commits into from
Sep 1, 2024
Merged

Improve textarea paste #31948

merged 2 commits into from
Sep 1, 2024

Conversation

silverwind
Copy link
Member

@silverwind silverwind commented Aug 30, 2024

  • When pasting a URL over another URL, replace the URL instead of creating a useless [url](url). This is the 1-line change here.
  • Always run initTextareaEvents, previously it was not run when dropzoneEl was not present like when attachements are disabled on the server. Refactored the function to gracefully handle absent dropzoneEl and rename the function to a better name.

- Always initialize the paste code, previously it was not initialized
  when this.dropzone was not there which is the case when attachements
  are disabled on the server.
- When pasting a URL over another URL, replace the URL instead of
  creating a nested markdown link.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 30, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 30, 2024
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Aug 30, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 1, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 1, 2024
@6543 6543 enabled auto-merge (squash) September 1, 2024 15:10
@6543 6543 added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 1, 2024
@6543 6543 merged commit 5550226 into go-gitea:main Sep 1, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Sep 1, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 1, 2024
@silverwind silverwind deleted the tpaste branch September 2, 2024 08:50
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 5, 2024
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  [skip ci] Updated translations via Crowdin
  Remove html tags from create tag and branch translation (go-gitea#31973)
  Replace v-html with v-text in search inputbox (go-gitea#31966)
  [skip ci] Updated translations via Crowdin
  [skip ci] Updated translations via Crowdin
  Improve get feed with pagination (go-gitea#31821)
  Remove urls from translations (go-gitea#31950)
  Prevent update pull refs manually and will not affect other refs update (go-gitea#31931)
  [skip ci] Updated translations via Crowdin
  nix wording nit in todo code comment
  Fix 500 error when `state` params is set when editing issue/PR by API (go-gitea#31880)
  Fix sort order for organization home and user profile page (go-gitea#31921)
  Improve textarea paste (go-gitea#31948)
  Fix index too many file names bug (go-gitea#31903)
  [skip ci] Updated translations via Crowdin
  Move web globals to `web_src/js/globals.d.ts` (go-gitea#31943)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants