Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions static/app/components/issues/groupList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export type GroupListColumn =

type Props = WithRouterProps & {
api: Client;
/**
* Number of placeholder rows to show during loading
*/
numPlaceholderRows: number;
organization: Organization;
queryParams: Record<string, number | string | string[] | undefined | null>;
customStatsPeriod?: TimePeriodType;
Expand Down Expand Up @@ -263,6 +267,7 @@ class GroupList extends Component<Props, State> {
queryFilterDescription,
source,
query,
numPlaceholderRows,
} = this.props;
const {loading, error, errorData, groups, memberList, pageLinks} = this.state;

Expand Down Expand Up @@ -306,11 +311,7 @@ class GroupList extends Component<Props, State> {
<GroupListHeader withChart={!!withChart} withColumns={columns} />
<PanelBody>
{loading
? [
...new Array(
typeof queryParams?.limit === 'number' ? queryParams?.limit : 4
),
].map((_, i) => (
? [...new Array(numPlaceholderRows)].map((_, i) => (
<GroupPlaceholder key={i}>
<Placeholder height="50px" />
</GroupPlaceholder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function RelatedIssues({
customStatsPeriod={timePeriod}
useTintRow={false}
source="alerts-related-issues"
numPlaceholderRows={queryParams.limit}
/>
</TableWrapper>
</Fragment>
Expand Down
1 change: 1 addition & 0 deletions static/app/views/alerts/rules/uptime/uptimeIssues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export function UptimeIssues({project, ruleId}: Props) {
limit: 1,
}}
renderEmptyMessage={emptyMessage}
numPlaceholderRows={1}
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export function DetectorDetailsOngoingIssues({detectorId, query}: Props) {
withChart={false}
renderEmptyMessage={EmptyMessage}
source="detector-details"
numPlaceholderRows={queryParams.limit}
/>
</ErrorBoundary>
</Section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export function MonitorIssues({monitor, monitorEnvs}: Props) {
withChart={false}
useTintRow={false}
source="monitors"
numPlaceholderRows={20}
/>
</Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function RelatedIssuesSection({group, relationType}: RelatedIssuesSectionProps)
canSelectGroups={false}
withChart={false}
withColumns={['event']}
numPlaceholderRows={4}
/>
</Fragment>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function RelatedIssues({
withChart={false}
withPagination={false}
source="performance-related-issues"
numPlaceholderRows={queryParams.limit}
/>
</TableWrapper>
</Fragment>
Expand Down
3 changes: 2 additions & 1 deletion static/app/views/projectDetail/projectIssues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function ProjectIssues({organization, location, projectId, query, api}: Props) {
: [`${IssuesQuery.ALL}`, query].join(' ').trim();

const queryParams = {
limit: '5',
limit: 5,
...normalizeDateTimeParams(
pick(location.query, [...Object.values(URL_PARAM), 'cursor'])
),
Expand Down Expand Up @@ -292,6 +292,7 @@ function ProjectIssues({organization, location, projectId, query, api}: Props) {
withPagination={false}
onFetchSuccess={handleFetchSuccess}
source="project"
numPlaceholderRows={queryParams.limit}
/>
</Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ class ReleaseIssues extends Component<Props, State> {
withPagination={false}
onFetchSuccess={this.handleFetchSuccess}
source="release"
numPlaceholderRows={queryParams.limit}
/>
</div>
</Fragment>
Expand Down
1 change: 1 addition & 0 deletions static/app/views/releases/drawer/newIssues.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export function NewIssues({release, projectId, withChart = false}: Props) {
renderEmptyMessage={renderEmptyMessage}
withPagination
source="release-drawer"
numPlaceholderRows={3}
/>
);
}
Loading