feat: Deep-links no mapa (pin → conteúdo)#290
Merged
Conversation
- map_deep_link: funcao pura que resolve a rota de detalhe por tipo de pin - MapScreen: toque tratado no nivel do mapa (MapOptions.onTap + pin mais proximo), mais confiavel na web; 'Ver detalhes' navega para /events, /assets, /alerts ou feed - Pins sem destino mostram 'Fechar' (entity/media) - mainShellTabProvider: indice da aba do shell (permite deep-link de post para o feed) - Strings i18n (close) + regen - Testes do resolvedor de deep-link Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Descrição
Próxima evolução da sequência: deep-links no mapa. Antes, o botão "Ver detalhes" da folha do pin era um no-op. Agora, tocar num pin abre a folha e navega para o detalhe correspondente.
Mudanças (app
frontend/arah.app)map_deep_link.dart: função puramapPinDeepLink(pin, territoryId)que resolve a rota por tipo de pin (event → /events,asset → /assets,alert → /alerts,post → /home/feed;entity/mediasem destino).MapScreen: o toque passou a ser tratado no nível do mapa (MapOptions.onTap+ seleção do pin mais próximo em pixels), por ser confiável na web (oGestureDetectorpor marcador doflutter_map8.x não dispara de forma consistente). "Ver detalhes" navega para a tela certa; pins sem destino mostram "Fechar".mainShellTabProvider: índice da aba do shell extraído para um provider, permitindo o deep-link de post levar ao feed;MainShellScreenrefatorado para usá-lo (comportamento preservado).close) + regeneração das localizations.🔄 Tipo de Mudança
🧪 Testes
flutter analyze --no-fatal-infos— sem erros/warnings nas mudançasflutter test— 47 passando (+6: resolvedor de deep-link cobrindo todos os tipos de pin)Walkthrough
Folha do pin no mapa com botão Ver detalhes
Tela de Eventos após o deep-link do pin
Observação: a folha do pin e a navegação "Ver detalhes → Eventos" foram verificadas end-to-end. O acerto de toque depende da precisão do clique (tolerância de 48px ao pin mais próximo); a lógica de resolução de rota é coberta por testes unitários.
To show artifacts inline, enable in settings.