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

Standardize social media fields to accept both URLs and URIs. #374

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

TalysonSoares
Copy link
Member

@TalysonSoares TalysonSoares commented Jul 29, 2024

Q A
Branch? improvement/social-media-links
Bug fix? yes
New feature? yes
Deprecations? yes
Issues Fix #357

Neste PR, criei um enum de redes sociais que contém as expressões regulares necessárias para a validação de URLs e usuários das redes sociais, veja as alterações em SocialMediaEnum.php.

Refatorei o método parseSocialMediaUser, utilizando Object Calisthenics e boas práticas, e incrementei o método para aceitar diferentes tipos de URLs do Spotify, tanto de artistas quanto de usuários comuns. Além disso, alterei a função buildSocialMediaLink para que ela construa URLs corretamente para outras redes sociais, como Spotify e LinkedIn, veja as alterações em Utils.php e Utils.js.

Removi o ícone do Twitter e adicionei o novo ícone do X, além de criar um novo campo para incluir o TikTok.

socialEdit

socialLink

Atualizei o ícone do X no componente entity-header, mas notei que os links nesse mesmo componente estão com o href apontando para a URL errada. Este problema será corrigido em um novo PR.

@TalysonSoares TalysonSoares self-assigned this Jul 29, 2024
@TalysonSoares TalysonSoares marked this pull request as draft July 29, 2024 13:20
saracamilo
saracamilo previously approved these changes Jul 29, 2024
@TalysonSoares TalysonSoares force-pushed the improvement/social-media-links branch 3 times, most recently from bafef54 to aa13ef5 Compare July 29, 2024 19:06
@TalysonSoares TalysonSoares marked this pull request as ready for review July 29, 2024 19:45
@TalysonSoares TalysonSoares force-pushed the improvement/social-media-links branch 3 times, most recently from ec1618e to 6869b98 Compare July 30, 2024 14:25
@TalysonSoares TalysonSoares force-pushed the improvement/social-media-links branch from 6869b98 to 7bdb8cb Compare August 1, 2024 22:33
@TalysonSoares TalysonSoares changed the title Standardize social media fields to accept both URLs and usernames. Standardize social media fields to accept both URLs and URIs. Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Padronização e Inclusão de Redes Sociais no Sistema.
3 participants