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

Related links #1054

Open
wants to merge 28 commits into
base: dev/new_features
Choose a base branch
from
Open

Conversation

JaviviJR
Copy link

@JaviviJR JaviviJR commented Aug 22, 2024

Added new dynamic field in profile section witch let us to add related links.

#839

imagen

@BentiGorlich BentiGorlich linked an issue Aug 27, 2024 that may be closed by this pull request
@BentiGorlich BentiGorlich added enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end labels Aug 27, 2024
@BentiGorlich
Copy link
Member

Can you implement it the mastodon way where you have a name-link combination? So that each add link field has an associated name field.
grafik

@JaviviJR
Copy link
Author

JaviviJR commented Sep 3, 2024

Can you implement it the mastodon way where you have a name-link combination? So that each add link field has an associated name field. grafik

Do you want that user can add just links or whatever data user wants like Mastodon?

@BentiGorlich BentiGorlich added this to the v1.8.0 milestone Sep 4, 2024
@BentiGorlich
Copy link
Member

Limit it to links would be fine for me, but I don't think that it makes sense 🤔

assets/controllers/form-related-links_controller.js Outdated Show resolved Hide resolved
@@ -894,4 +897,14 @@ public function canUpdateUser(User $actor): bool
return $this->apDomain === $actor->apDomain;
}
}

public function getRelatedLinks(): array
Copy link
Member

Choose a reason for hiding this comment

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

Could you add phpDoc so we know which kind of array is returned? I really liked if the returned value would be of RelatedLink[] so an array of objects, so we can add some validation logic so we can mark links as "checked" or something so we know that the rel=me is actually correct

Copy link
Author

Choose a reason for hiding this comment

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

Discussed Discussed on element chat.
I don't know a elegant way to denormalize the json field from table and return it on get method. This'll required some dependencies inside entity that I think is not a good practice.
Instead, I created a RelatedLinkDTO class and this will be returned in UserDTO.

@melroy89
Copy link
Member

melroy89 commented Sep 7, 2024

Can you implement it the mastodon way where you have a name-link combination? So that each add link field has an associated name field. grafik

Agreed that would be helpful, so it's basically a key/value list.

Copy link
Member

@BentiGorlich BentiGorlich left a comment

Choose a reason for hiding this comment

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

I'd love if the add button would something like this (but that is not a requirement):
grafik

I noticed that the links are not yet displayed on the profile page. Are you planning on adding that in this PR?
(The activity pub representation of the fields is also missing, but I expected to do that myself anyways :) but if you'd like to try that as well, feel free to do so)

src/DTO/RelatedLinkDTO.php Outdated Show resolved Hide resolved
src/DTO/RelatedLinkDTO.php Outdated Show resolved Hide resolved
src/Entity/User.php Outdated Show resolved Hide resolved
src/Factory/UserFactory.php Outdated Show resolved Hide resolved
assets/styles/layout/_forms.scss Outdated Show resolved Hide resolved
translations/messages.en.yaml Outdated Show resolved Hide resolved
@BentiGorlich
Copy link
Member

Oh and please change the target of the PR to dev/new_features

@JaviviJR JaviviJR force-pushed the related-links branch 2 times, most recently from edc97fa to 481b0f7 Compare September 16, 2024 16:58
@JaviviJR JaviviJR changed the base branch from main to dev/new_features September 16, 2024 16:58
@JaviviJR JaviviJR force-pushed the related-links branch 2 times, most recently from ffbdc54 to 98ed7e1 Compare September 16, 2024 17:38
Added new dynamic field in profile section witch let us to add related links.
@BentiGorlich
Copy link
Member

could you rebase your branch on dev/new_features please so the github actions are triggered? We forgot to update the config for that :)

@melroy89
Copy link
Member

melroy89 commented Sep 27, 2024

Also there is file conflicts xd again? Sorry about that.

Co-authored-by: Melroy van den Berg <melroy@melroy.org>
@melroy89
Copy link
Member

melroy89 commented Nov 8, 2024

Fixed merge conflicts..

@melroy89 melroy89 requested a review from BentiGorlich November 8, 2024 13:04
@melroy89 melroy89 dismissed BentiGorlich’s stale review November 8, 2024 13:11

Revisit the latest code changes

@melroy89
Copy link
Member

melroy89 commented Nov 8, 2024

Fix the php-cs-fixer

@melroy89
Copy link
Member

melroy89 commented Nov 8, 2024

PR should be ready for last review now.. I hope. 🥳

@BentiGorlich
Copy link
Member

@JaviviJR did you push all your changes? The modifications of the edit profile page and the user box are not there, yet

@BentiGorlich BentiGorlich force-pushed the dev/new_features branch 2 times, most recently from e05d4f2 to 6bae56c Compare December 10, 2024 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend Visual issues, improvements, bugs or other aspects relating mostly to the front end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set rel="me" links on profile
3 participants