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 Settings pages and convert to functional components #8160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

VerboseCat
Copy link
Contributor

@VerboseCat VerboseCat commented Aug 23, 2024

Proposed changes

This PR is a follow-up to the the PR which introduced custom page titles (#7374). This PR converts several 'Settings' 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

  • Settings/Security/Groups (settings/Groups.tsx)
  • Settings/Security/Marking Definitions (settings/MarkingDefinitions.tsx)
  • Settings/Security/Roles (settings/Roles.tsx)
  • Settings/Security/Sessions (settings/Sessions.jsx)

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:

  • Settings: Security: Sessions

@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch 2 times, most recently from 10c779e to 4f88181 Compare August 28, 2024 13:24
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch 5 times, most recently from 8f8479a to cda8fe9 Compare September 6, 2024 13:46
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.28%. Comparing base (7d60d33) to head (7ad134d).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8160      +/-   ##
==========================================
- Coverage   66.29%   66.28%   -0.01%     
==========================================
  Files         597      597              
  Lines       60958    60958              
  Branches     6262     6263       +1     
==========================================
- Hits        40412    40406       -6     
- Misses      20546    20552       +6     

☔ 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 6, 2024 21:26
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch 2 times, most recently from a16d044 to 14658ad Compare September 10, 2024 22:54
@aHenryJard aHenryJard added the community use to identify PR from community label Sep 12, 2024
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch from 14658ad to 4eea986 Compare September 12, 2024 18:15
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch 3 times, most recently from c3c5ef3 to 79df089 Compare September 26, 2024 16:09
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch from 79df089 to 4166d20 Compare October 1, 2024 12:31
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch 2 times, most recently from 110452d to f917015 Compare October 17, 2024 12:02
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch from e47c21a to d8b2642 Compare October 22, 2024 14:19
Bonsai8863 and others added 2 commits October 22, 2024 10:45
Revert WIP conversion of Sectors

test commit

Fix paginationOptions issue for Groups, KillChainPhases, Roles

Fix MarkingDefinitions, update KillChainPhases to reflect master

Remove changes established in PR OpenCTI-Platform#7753

Add Malwares.tsx to removed changes

Post-rebase cleanup

Remove changes from PR 7753

Remove outdated changes to KillChainPhases

Fix translations

Align GroupLine design with master

Fix typing on GroupLines;

Remove variant from breadcrumbs
@VerboseCat VerboseCat force-pushed the convert_class_components_settings branch from d8b2642 to 7ad134d Compare October 22, 2024 14:46
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.

4 participants