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

Feature: Linkwarden widget #3832

Closed
wants to merge 2 commits into from

Conversation

PyrokineticDarkElf
Copy link
Contributor

Proposed change

Closes #2980

This service adds support to:

  • Display stats from Linkwarden
  • Display recent bookmarks from Linkwarden
  • Display lists of bookmarks from a Linkwarden collection or multiple collections
  • Display lists of bookmarks from a Linkwarden tag or multiple tags

Documentation had been included on how to use the new widget.

Screenshots:

Multiple configs available for different data displays
image
image
image
image
image

Relevant API responses:

/api/v1/collections:

{
    "response": [
        {
            "id": 8,
            "name": "Homelab",
            "description": "",
            "color": "#ff0000",
            "parentId": null,
            "isPublic": false,
            "ownerId": 1,
            "createdAt": "2024-04-18T21:45:13.843Z",
            "updatedAt": "2024-04-18T21:45:13.843Z",
            "parent": null,
            "members": [],
            "_count": {
                "links": 24
            }
        }
    ]
}

/api/v1/tags:

{
    "response": [
        {
            "id": 118,
            "name": "HTML",
            "ownerId": 1,
            "createdAt": "2024-04-19T09:20:56.287Z",
            "updatedAt": "2024-04-19T09:20:56.287Z",
            "_count": {
                "links": 1
            }
        }
    ]
}

/api/v1/links:

{
    "response": [
        {
            "id": 840,
            "name": "Habitica - Gamify Your Life",
            "type": "url",
            "description": "Habitica - Gamify Your Life",
            "collectionId": 14,
            "url": "https://habitica.com/static/home",
            "textContent": null,
            "preview": "unavailable",
            "image": "unavailable",
            "pdf": "unavailable",
            "readable": "unavailable",
            "monolith": "unavailable",
            "lastPreserved": "2024-08-05T09:48:27.214Z",
            "importDate": null,
            "createdAt": "2024-08-05T09:48:14.848Z",
            "updatedAt": "2024-08-05T09:48:27.216Z",
            "tags": [],
            "collection": {
                "id": 14,
                "name": "Unorganized",
                "description": "",
                "color": "#ffffff",
                "parentId": null,
                "isPublic": false,
                "ownerId": 1,
                "createdAt": "2024-04-18T22:47:08.959Z",
                "updatedAt": "2024-04-18T22:47:54.325Z"
            },
            "pinnedBy": []
        }
    ]
}

Notes:

I had to disable no-underscore-dangle in ESLint using comments due to API constraints.

/* eslint-disable no-underscore-dangle */
Some code
/* eslint-enable no-underscore-dangle */

Type of change

  • New service widget
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation only
  • Other (please explain)

Checklist:

  • If applicable, I have added corresponding documentation changes.
  • If applicable, I have reviewed the feature and / or service widget guidelines.
  • I have checked that all code style checks pass using pre-commit hooks and linting checks.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.

@shamoon
Copy link
Collaborator

shamoon commented Aug 8, 2024

I will find some time to look at this more but honestly it’s probably not going to be accepted like this. It doesn’t follow our standards. We really don’t allow widgets to be make up their own layouts because we try very hard to keep homepage consistent

@PyrokineticDarkElf
Copy link
Contributor Author

I understand the need for uniformity.

Do you think any form of list could be added in the future? I was thinking while making this how surprising it is there's no list component yet.

I can easily edit this to display stats only. It would be a bit of a shame though. What suggestions do you have that may work, if any?

Perhaps a module that follows the same styling as the manual bookmarks?
image

@shamoon
Copy link
Collaborator

shamoon commented Aug 9, 2024

There are a couple of widgets that use a list format, it is much simpler and should be limited to X items. For example Frigate or the custom API.

Overall though, Im sorry to say this needs to be simplified to be accepted. We're not open to making homepage a kind of display frontend for bookmark services, it's a 'can of worms' kinda thing, sorry.

An alternative, perhaps, would be a tool (completely separate from homepage) that pulls from link warden and synchronizes to the bookmarks yaml. Just a thought.

Let us know how you'd like to proceed with this. I'll mark it as a draft for now. Thanks for your interest in the project

@shamoon shamoon marked this pull request as draft August 9, 2024 01:15
@shamoon shamoon changed the title Added support and documentation for Linkwarden (selfhosted bookmark manager) Feature: Linkwarden widget Aug 9, 2024
@erlenddahl
Copy link

As a prospective user of this widget, I just wanted to say that I'm more than happy with the widget shown in the first screenshot (showing just the number of links, collections and tags).

(And I would really like that, so I hope it will be published in that minimal version if the other variants are too complex.)

@alprojects1
Copy link

is there any we can add Twingate ? to homepage sorry if this is not the correct area I am new.

Copy link
Contributor

github-actions bot commented Sep 9, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants