Skip to content

Conversation

@ToMESSKa
Copy link
Contributor

@ToMESSKa ToMESSKa commented Sep 18, 2025

INSTUI-4522

ISSUE:

  • console messages which are displayed in development are not shown in the preview build

TEST PLAN:

  • test code examples below, all of them should emit a console messages in the browser's console
<Alert screenReaderOnly> This is alert </Alert>
<Heading variant="titlePageDesktop" as="div" > titlePageDesktop </Heading>
function TestComponent(props) {
  const filteredProps = View.omitViewProps(props, TestComponent)
  
  return (
    <View {...filteredProps}>
      Content
    </View>
  )
}

render(<TestComponent invalidProp="value" display="block" />)
<InstUISettingsProvider dir="auto">
  <div>LTR text</div>
</InstUISettingsProvider>
  • based on the logic, the console messages should not appear in production if it's not a Github preview
  • these console messages should appear in the local development build too

@github-actions
Copy link

github-actions bot commented Sep 18, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-11-06 12:37 UTC

@ToMESSKa ToMESSKa self-assigned this Sep 18, 2025
@ToMESSKa ToMESSKa force-pushed the INSTUI-4522-docs-preview-builds-should-show-console-logs branch 28 times, most recently from a3b7be0 to 0144089 Compare September 25, 2025 12:17
@ToMESSKa ToMESSKa force-pushed the INSTUI-4522-docs-preview-builds-should-show-console-logs branch 8 times, most recently from 6e32547 to 1b610ed Compare October 16, 2025 11:53
@ToMESSKa ToMESSKa force-pushed the INSTUI-4522-docs-preview-builds-should-show-console-logs branch 5 times, most recently from c92a563 to 01766ee Compare October 16, 2025 13:10
@ToMESSKa ToMESSKa marked this pull request as ready for review October 16, 2025 13:21
@ToMESSKa ToMESSKa changed the title build(console): make documentation preview builds show console messages chore(many): make documentation preview builds show console messages Oct 16, 2025
@ToMESSKa ToMESSKa requested review from balzss and matyasf October 16, 2025 13:24
Copy link
Collaborator

@matyasf matyasf left a comment

Choose a reason for hiding this comment

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

see my comments

Comment on lines +85 to +87
new webpack.DefinePlugin({
'process.env.GITHUB_PULL_REQUEST_PREVIEW': JSON.stringify(GITHUB_PULL_REQUEST_PREVIEW),
}),
Copy link
Collaborator

Choose a reason for hiding this comment

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

just curious, why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matyasf I tried to omit this plugin, but it results in process.env.GITHUB_PULL_REQUEST_PREVIEW becoming undefined in the browser. This makes environment variable values available in client-side.

@ToMESSKa ToMESSKa force-pushed the INSTUI-4522-docs-preview-builds-should-show-console-logs branch 3 times, most recently from 2fcd1ad to 1a8b263 Compare October 29, 2025 15:03
@ToMESSKa ToMESSKa force-pushed the INSTUI-4522-docs-preview-builds-should-show-console-logs branch from 1a8b263 to 9d7ac91 Compare October 29, 2025 15:20
@ToMESSKa ToMESSKa requested a review from matyasf October 29, 2025 16:39
Copy link
Collaborator

@matyasf matyasf left a comment

Choose a reason for hiding this comment

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

nice work, this will help a lot with quick debugging

@ToMESSKa ToMESSKa changed the base branch from master to v12 November 6, 2025 12:33
@ToMESSKa ToMESSKa merged commit a2a1965 into v12 Nov 6, 2025
13 of 14 checks passed
@ToMESSKa ToMESSKa deleted the INSTUI-4522-docs-preview-builds-should-show-console-logs branch November 6, 2025 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants