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

Repository snippets frontend inconsistencies #2234

Closed
jaqobb opened this issue Sep 29, 2024 · 1 comment
Closed

Repository snippets frontend inconsistencies #2234

jaqobb opened this issue Sep 29, 2024 · 1 comment
Labels
bug Bugs & errors found in Reposilite cosmetic Issue is not harmful and affects only cosmatic part of a project

Comments

@jaqobb
Copy link

jaqobb commented Sep 29, 2024

What happened?

I have noticed a few inconsistencies in repository snippets. Mainly:

  • Gradle Kotlin & Gradle Groovy repository snippets do not have the repository name included. As such, trying to copy the following Gradle Kotlin repository to the clipboard:
maven {
    name = "jaqobbRepositoryReleases"
    url = uri("https://repository.jaqobb.dev/releases")
}

results in the following being copied:

maven {
    url = uri("https://repository.jaqobb.dev/releases")
}
  • Maven and SBT repository snippets have different amount of spaces / tab length (2) compared to Gradle Kotlin & Gradle Kotlin (4). While I do not use Scala and cannot speak on that, I understand there are people using 2 spaces in XML files. As such, I believe the amount of spaces should be updated to be the same (2/4) across all repository snippets or a simple configuration should be added allowing this to be adjusted by the end-user.

I am not really proficient in frontend technologies and cannot make a PR for that. However, I am pretty sure these do not require any huge changes.

Reposilite version

3.x

Relevant log output

No response

@jaqobb jaqobb added the bug Bugs & errors found in Reposilite label Sep 29, 2024
@dzikoysk dzikoysk added the cosmetic Issue is not harmful and affects only cosmatic part of a project label Sep 29, 2024
WithoutAName25 added a commit to WithoutAName25/reposilite that referenced this issue Oct 2, 2024
The snippet is now extracted from the HTML via textContent and not generated separately to avoid inconsistencies
@WithoutAName25
Copy link
Contributor

I have fixed the first issue with the inconsistencies between the displayed text and the copied text. It would be easy to change the indent of the snippets if that is wanted. If the indent should be configurable it would be more complex but I can take a look at it if this is desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs & errors found in Reposilite cosmetic Issue is not harmful and affects only cosmatic part of a project
Projects
None yet
Development

No branches or pull requests

3 participants