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

feat(issue-details): Add streamlined sidebar and activity #77958

Merged
merged 12 commits into from
Sep 24, 2024

Conversation

roggenkemper
Copy link
Member

this pr adds in the dismissible sidebar and a first version of adding activity to the sidebar. the sidebar can now be dismissed, allowing for the rest of the issue details page to be displayed larger. the first version of activity in the sidebar will only show activities, the ability to comment is not added yet (will be done in a separate PR). Because of this, the tab will still be there until then.

Screenshot 2024-09-23 at 10 03 30 AM

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 23, 2024
} from 'sentry/icons';
import {GroupActivityType} from 'sentry/types/group';

export const GroupActivityTypeIconMapping: Record<GroupActivityType, React.ReactNode> = {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is my attempt at getting somewhat unique icons for each different activity type that somewhat matches the activity they are describing. will happily take suggestions for improvements here.

@@ -0,0 +1,701 @@
import {Fragment} from 'react';
Copy link
Member Author

Choose a reason for hiding this comment

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

this is a copy of the existing file but with each message reworded to fit our new title/message format

Copy link

codecov bot commented Sep 23, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
7848 1 7847 0
View the top 1 failed tests by shortest run time
Custom Repositories renders with custom-symbol-sources feature enabled Custom Repositories renders with custom-symbol-sources feature enabled
Stack Traces | 5.63s run time
Error: thrown: &quot;Exceeded timeout of 5000 ms for a test.
Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout.&quot;
    at .../sources/customRepositories/index.spec.tsx:69:3
    at _dispatchDescribe (.../jest-circus/build/index.js:91:26)
    at describe (.../jest-circus/build/index.js:55:5)
    at Object.&lt;anonymous&gt; (.../sources/customRepositories/index.spec.tsx:46:1)
    at Runtime._execModule (.../jest-runtime/build/index.js:1439:24)
    at Runtime._loadModule (.../jest-runtime/build/index.js:1022:12)
    at Runtime.requireModule (.../jest-runtime/build/index.js:882:12)
    at jestAdapter (.../build/legacy-code-todo-rewrite/jestAdapter.js:77:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runTestInternal (.../jest-runner/build/runTest.js:367:16)
    at runTest (.../jest-runner/build/runTest.js:444:34)
    at Object.worker (.../jest-runner/build/testWorker.js:106:12)

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

import {GroupActivityType} from 'sentry/types/group';

export const GroupActivityTypeIconMapping: Record<GroupActivityType, React.ReactNode> = {
[GroupActivityType.NOTE]: <IconFile />,
Copy link
Member

Choose a reason for hiding this comment

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

i think you want to do just IconFile and render it later since this version makes it hard to pass any props to and renders them when the app loads. Here's one with icons i tried recently

const errorLevelIconMap: Readonly<Record<Level, IconWithDefaultProps>> = {
error: {Component: IconClose, defaultProps: {isCircled: true}},
fatal: {Component: IconFatal, defaultProps: {}},
info: {Component: IconInfo, defaultProps: {}},
warning: {Component: IconWarning, defaultProps: {}},
sample: {Component: null, defaultProps: {}},
unknown: {Component: null, defaultProps: {}},
};

Suggested change
[GroupActivityType.NOTE]: <IconFile />,
[GroupActivityType.NOTE]: IconFile,

GroupActivityType,
IconWithDefaultProps
> = {
[GroupActivityType.NOTE]: {Component: IconFile, defaultProps: {}},
Copy link
Member

Choose a reason for hiding this comment

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

if you don't need the defaultProps you don't need to add it lol

[GroupActivityType.AUTO_SET_ONGOING]: {Component: IconPlay, defaultProps: {}},
[GroupActivityType.SET_ESCALATING]: {
Component: IconGraph,
defaultProps: {type: 'area'},
Copy link
Member

Choose a reason for hiding this comment

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

oh you did

@roggenkemper roggenkemper merged commit 2446a87 into master Sep 24, 2024
41 of 42 checks passed
@roggenkemper roggenkemper deleted the roggenkemper/sidebartest branch September 24, 2024 16:30
@scttcper scttcper added the Trigger: Revert add to a merged PR to revert it (skips CI) label Sep 24, 2024
@getsentry-bot
Copy link
Contributor

PR reverted: e696dc7

getsentry-bot added a commit that referenced this pull request Sep 24, 2024
@scttcper
Copy link
Member

Reverting because this change broke thirds layout on other pages

roggenkemper added a commit that referenced this pull request Sep 24, 2024
new version of #77958 , which
was reverted because the condition for not using a grid layout was being
read as false (undefined) on non-issues pages. this pr updates it to
only change the layout of the issue details container so it won't affect
any other page.
0Calories pushed a commit that referenced this pull request Sep 25, 2024
this pr adds in the dismissible sidebar and a first version of adding
activity to the sidebar. the sidebar can now be dismissed, allowing for
the rest of the issue details page to be displayed larger. the first
version of activity in the sidebar will only show activities, the
ability to comment is not added yet (will be done in a separate PR).
Because of this, the tab will still be there until then.


![Screenshot 2024-09-23 at 10 03
30 AM](https://github.com/user-attachments/assets/1c092938-09ed-474c-a85f-e00fcf2f2108)
0Calories pushed a commit that referenced this pull request Sep 25, 2024
0Calories pushed a commit that referenced this pull request Sep 25, 2024
new version of #77958 , which
was reverted because the condition for not using a grid layout was being
read as false (undefined) on non-issues pages. this pr updates it to
only change the layout of the issue details container so it won't affect
any other page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components Trigger: Revert add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants