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

[frontend] Add page titles to Data pages #8300

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

Conversation

VerboseCat
Copy link
Contributor

@VerboseCat VerboseCat commented Sep 10, 2024

Proposed changes

This PR is a follow-up to the the PR which introduced custom page titles (#7374). This PR converts several 'Data' components from classes to functional and adds page titles. These components were not included in the original PR because they were class components and could not use the page title hook.

Impacted Pages
*

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

This PR has a known issue, which has also been reported in a comment on (#7753). Every time a page renders, both the the custom page title setting function useConnectedDocumentModifier.setTitle and the default page title setting function useDocumentLangModifier run and set the title. In some instances, the default page title is set after the custom page title is set. This results in the default page title being displayed. I was unable to find a cause or pattern for which components exhibit this bug.

The following components from this PR are impacted:

  • Entities / Sectors (entities/Sectors.jsx)
  • Data / Ingestion / Connectors (data/Connectors.jsx)
  • Data / Data sharing / Live streams (data/Streams.tsx)

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.20%. Comparing base (d507f71) to head (e966485).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8300      +/-   ##
==========================================
- Coverage   66.21%   66.20%   -0.01%     
==========================================
  Files         597      597              
  Lines       60422    60422              
  Branches     6204     6201       -3     
==========================================
- Hits        40008    40005       -3     
- Misses      20414    20417       +3     
Flag Coverage Δ
66.20% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@VerboseCat VerboseCat marked this pull request as ready for review September 12, 2024 19:21
@Jipegien Jipegien added the community use to identify PR from community label Sep 16, 2024
@VerboseCat VerboseCat force-pushed the convert_class_components_data branch 2 times, most recently from 51868e2 to f1e9992 Compare September 26, 2024 15:02
WIP - Adding Titles to pages

WIP - Updating Titles

WIP - Updating Titles for Functional Components only.

Updated Titles. Some class component pages have not been updated.

Revert "Updated Titles. Some class component pages have not been updated."

This reverts commit babb1cd.

Updated Titles. Some class component pages have not been updated.

Resolving Merge Conflicts

WIP - Converting class components to functional components

WIP - pushing current updates.

Fix merge issues

Fix Roles.tsx to be able to compile

Add latest version of Narratives.tsx

Replace key 'FAB_REPLACED' with 'FAB_REPLACEMENT'

Convert KillChainPhases to functional component

Updated Sectors. Need to update SectorLine and SectorsLines.

WIP - converting IngestionRss

WIP - finished IngestionRSS conversion

WIP

WIP - Modified IngestionTaxiis

WIP editing Connectors and Tasks.

WIP - one more to convert

WIP - modifying Streams.tsx and ImportContent.tsx.

WIP

Convert Connectors back to JSX functional component

WIP - updated Streams

Convert Stream to functional

Finished Import Content

Remove changes from PR 7753

Remove changes from PR 7753 (pt 2)

Remove changes from PR 7753 (pt 3)

Remove changes from PR 7753 (pt 4)

Remove duplicate Data titles

Remove duplicate Data titles (pt 3)

Remove sectors.jsx

Add translations

Convert Sectors closer to original component

Remove variant from breadcrumbs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community use to identify PR from community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants