-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Hold for payment 7-17][$1000] Web - Console log "Invalid Attempt to destructure non-iterable instance" error when clicking 'Add reaction' icon #21833
Comments
Triggered auto assignment to @Christinadobrzyn ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.When clicking 'Add reaction' icon, console log error is shown. What is the root cause of that problem?When show modal, status bar color will be set using App/src/components/Modal/index.web.js Lines 27 to 35 in 3dc50e0
StyleUtils.getThemeBackgroundColor will be called twice when show popup menu and when show reaction modal.And the return value of the first call becomes the input of the second call. The return value of the first call is of the same format as rgb(6, 33, 20) .Lines 699 to 710 in 3dc50e0
Lines 396 to 404 in 3dc50e0
Line 702 in 3dc50e0
So the error What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)None. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Console log error when clicking 'Add reaction' icon What is the root cause of that problem?
Line 701 in 98bb603
What changes do you think we should make in order to solve the problem?Line 698 in 98bb603
For the case that function rgbToArray(rgbColor) {
const components = /^rgb\(([0-9]{1,2}),\s*([0-9]{1,2}),\s*([0-9]{1,2})\)$/i.exec(rgbColor);
if (components === null) return undefined;
return components.slice(1);
} And, update Line 701 in 98bb603
to const [backgroundRed, backgroundGreen, backgroundBlue] = rgbToArray(bgColor) || hexadecimalToRGBArray(bgColor); What alternative solutions did you explore? (Optional)N/A |
📣 @bhargavagonugunta! 📣
|
I can reproduce - adding External label |
Job added to Upwork: https://www.upwork.com/jobs/~0177a9790c8518250d |
Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Contributor details |
|
When I do testing, I don't see console error |
my name is bhargava gonugunta
my expensify account email is ***@***.***
my upwork profile is https://www.upwork.com/freelancers/~01b5bdebd526b4f100
…On Thu, 29 Jun 2023 at 02:50, melvin-bot[bot] ***@***.***> wrote:
Triggered auto assignment to Contributor-plus team member for initial
proposal review - @Santhosh-Sellavel
<https://github.com/Santhosh-Sellavel> (External)
—
Reply to this email directly, view it on GitHub
<#21833 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4I5R7SRCC4SPQDYOEYHNIDXNSN2XANCNFSM6AAAAAAZXPLY44>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
On Thu, 29 Jun 2023 at 3:19 PM, aliammar1995 ***@***.***> wrote:
When I do testing, I don't see console error
—
Reply to this email directly, view it on GitHub
<#21833 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4I5R7W6TDGZSNQIQIRNEW3XNVFTBANCNFSM6AAAAAAZXPLY44>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
My name is Bhargava Gonugunta
Email is : ***@***.***
Upwork profile url :
https://www.upwork.com/freelancers/~01b5bdebd526b4f100
|
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
function getThemeBackgroundColor(bgColor = themeColors.appBG) {
const backdropOpacity = variables.modalFullscreenBackdropOpacity;
const [backgroundRed, backgroundGreen, backgroundBlue] = hexadecimalToRGBArray(bgColor);
const [backdropRed, backdropGreen, backdropBlue] = hexadecimalToRGBArray(themeColors.modalBackdrop);
const normalizedBackdropRGB = convertRGBToUnitValues(backdropRed, backdropGreen, backdropBlue);
const normalizedBackgroundRGB = convertRGBToUnitValues(backgroundRed, backgroundGreen, backgroundBlue);
const themeRGBNormalized = convertRGBAToRGB(normalizedBackdropRGB, normalizedBackgroundRGB, backdropOpacity);
const themeRGB = convertUnitValuesToRGB(...themeRGBNormalized);
return `rgb(${themeRGB.join(', ')})`;
} What changes do you think we should make in order to solve the problem?
Convert Function codefunction convertColorToHex(color) {
if (typeof color !== "string") {
return null;
}
if (color.startsWith("rgba")) {
// eslint-disable-next-line no-unused-vars
const [un, r, g, b, a] = color.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
return `#${Number(r).toString(16).padStart(2, "0")}${Number(g).toString(16).padStart(2, "0")}${Number(b).toString(16).padStart(2, "0")}`;
}
if (color.startsWith("rgb")) {
// eslint-disable-next-line no-unused-vars
const [un, r, g, b] = color.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
return `#${Number(r).toString(16).padStart(2, "0")}${Number(g).toString(16).padStart(2, "0")}${Number(b).toString(16).padStart(2, "0")}`;
}
if (color.startsWith("#")) {
const hex = color.replace("#", "");
if (hex.length === 3) {
return `#${hex[0]}${hex[0]}${hex[1]}${hex[1]}${hex[2]}${hex[2]}`;
}
if (hex.length === 6) {
return `#${hex}`;
}
}
return null;
}
Usage codefunction hexadecimalToRGBArray(hexadecimal) {
+ const color = convertColorToHex(hexadecimal);
+ if (color === null) {
+ return undefined;
+ }
- const components = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hexadecimal);
+ const components = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
if (components === null) {
return undefined;
}
return _.map(components.slice(1), (component) => parseInt(component, 16));
} What alternative solutions did you explore? (Optional)
|
This comment was marked as outdated.
This comment was marked as outdated.
@anmurali, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@anmurali, @Christinadobrzyn, @Santhosh-Sellavel Still overdue 6 days?! Let's take care of this! |
@anmurali, @Christinadobrzyn, @Santhosh-Sellavel Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
This one fell through the cracks - apols @Natnael-Guchima, we still owe you for reporting bonus. @Natnael-Guchima payment details are in #23914 and an Upwork offer has been sent |
No problem @laurenreidexpensify |
Payment summary
|
@laurenreidexpensify I am not paid yet |
Hey @laurenreidexpensify I think you have paid me on upwork, I think the reporter is @Natnael-Guchima |
ah yes i just noticed this! Sorry folks Monday brain!! Nat v Nat!! |
No problem 😁 |
@Natnael-Guchima offer sent in Upwork 😅 |
Accepted the offer. Thanks @laurenreidexpensify 😁 |
Okay we can close now! Correct Nat has been paid! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Console log error shouldn't be displayed
Actual Result:
Console log error displayed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.34.1
Reproducible in staging?: n/a
Reproducible in production?: n/a
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screencast.from.2023-06-28.20-57-5.mp4
Expensify/Expensify Issue URL:
Issue reported by:@Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687469634741619
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: