-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[No QA] [TS migration] Migrate markdownTable.js to Typescript #36256
[No QA] [TS migration] Migrate markdownTable.js to Typescript #36256
Conversation
@@ -260,15 +263,13 @@ function markdownTable(table, options = {}) { | |||
sizeMatrix.splice(1, 0, sizes); | |||
|
|||
rowIndex = -1; | |||
/** @type {Array<string>} */ | |||
const lines = []; | |||
const lines: Array<string> = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const lines: Array<string> = []; | |
const lines: string[] = []; |
|
||
while (++rowIndex < cellMatrix.length) { | ||
const row = cellMatrix[rowIndex]; | ||
const sizes = sizeMatrix[rowIndex]; | ||
columnIndex = -1; | ||
/** @type {Array<string>} */ | ||
const line = []; | ||
const line: Array<string> = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eslint should error here:
const line: Array<string> = []; | |
const line: string[] = []; |
const row: Array<string> = []; | ||
const sizes: Array<number> = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const row: Array<string> = []; | |
const sizes: Array<number> = []; | |
const row: string[] = []; | |
const sizes: number[] = []; |
@@ -1,150 +1,158 @@ | |||
/* eslint-disable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are unable to test it as this only runs after a PR is merged. Let's test it locally and copy the result of markdownTable
to PR description, wdyt @SzymczakJ?
Because this migration requires other files to have import... except of require(..., let's wait for global migration of every require to import and module.exports to export. We already have a PR open on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll go a head and approve the PR to get the internal engineer assigned.
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25278 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
@stitesExpensify This PR ready for your review! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
🚀 Deployed to staging by https://github.com/stitesExpensify in version: 1.4.46-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.46-2 🚀
|
Details
Fixed Issues
$ #25278
PROPOSAL:
Tests
This is responsible for printing build details table after deployment and is used to make markdown out of 2d array, that's why this cannot be tested in the app. One way to test it is to write a simple js script that uses function mardownTable on a 2d array of strings. The terminal output of such test:
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop