Skip to content

Added Behance, Google Drive & Friendi.ca buttons #652

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

Merged
merged 7 commits into from
Dec 16, 2023

Conversation

Realmlist
Copy link
Contributor

@MagicLike MagicLike added the button New or updated buttons label Dec 15, 2023
@JulianPrieber JulianPrieber self-assigned this Dec 15, 2023
@JulianPrieber
Copy link
Member

Gotta put a hold on buttons for a minute.
I might move the button list from the database to a JSON file.

@JulianPrieber
Copy link
Member

Here is the first draft: main...button-db#diff-fdc3ead7ad583031fdd6763582319d4e9f5e022fdf4f8b2a76908013aa34ad9d
I want to move away from the database entries. They have just been a source of trouble from the beginning.

System load and response time should be about the same (unless you had an external db...). If you are using Redis, the file will be cached.

We need to carry over the button IDs for internal legacy systems. But now we can easily have button categories, proper spelling, and future proofing all in one file.

@JulianPrieber
Copy link
Member

Still not sure about the migration. We loose around 50 milliseconds to an uncached request to the database JSON compared to the database, in a worst case scenario with over 100 buttons. This file is requested on every links page load.

I might have to scrap this feature...

I may have to rewrite the updater to work with the existing database and just add new tables.

@JulianPrieber
Copy link
Member

@Realmlist Do you have any idea what to do for the X/Twitter button?

@JulianPrieber
Copy link
Member

Alright, I'm scrapping the JSON layout. I updated the database.
This is the new layout: 87dbdeb#diff-292b205d8e71aa6b8d8bfbdc00c488c15441fbbe1c77e8bde640676a508e9695

Please make sure your commit is up-to-date with this new format. Each entry now includes an alt field where the display name for the button is defined.

Also, please make sure the alt field in your previous commit matches the new format: https://github.com/LinkStackOrg/LinkStack/blob/main/database/seeders/ButtonSeeder.php#L877-L907

Copy link
Member

@JulianPrieber JulianPrieber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New format

@JulianPrieber JulianPrieber merged commit f5338f3 into LinkStackOrg:main Dec 16, 2023
@JulianPrieber
Copy link
Member

Changes are active in v4.7.0-beta-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
button New or updated buttons
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants