repo_name stringlengths 1 62 | dataset stringclasses 1
value | lang stringclasses 11
values | pr_id int64 1 20.1k | owner stringlengths 2 34 | reviewer stringlengths 2 39 | diff_hunk stringlengths 15 262k | code_review_comment stringlengths 1 99.6k |
|---|---|---|---|---|---|---|---|
ps-analysis-tool | github_2023 | typescript | 97 | GoogleChromeLabs | ayushnirwal | @@ -0,0 +1,82 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | @amovar18 Can you checkout [this](https://github.com/acvetkov/sinon-chrome) package i think we are already using it and if I am not wrong it provides mocking for extension related APIs |
ps-analysis-tool | github_2023 | typescript | 77 | GoogleChromeLabs | mohdsayed | @@ -51,26 +51,39 @@ const CookieDetails = ({ data, analytics, url }: CookieDetailsProps) => {
boolean | null
>(null);
- useEffect(() => {
+ const calculateCookieAttributes = useCallback(async () => {
setChromeCookieStoreHasCookie(null);
setisCookieIBCCompliant(null);
- (async () => {
- c... | Please handle Promise returned from `calculateCookieAttributes` |
ps-analysis-tool | github_2023 | typescript | 87 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,63 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | This can be simplified using `classnames`
```js
classNames({
'pointer-events-none opacity-50': column.columnDef.header === 'Name',
});
``` |
ps-analysis-tool | github_2023 | others | 87 | GoogleChromeLabs | mohdsayed | @@ -52,10 +57,13 @@ module.exports = {
primary: '#FFF',
secondary: '#E5E7EB',
tertiary: '#CBD5E1',
+ 'royal-blue': '#3871E0',
'anti-flash-white': '#F1F3F4',
gainsboro: '#DADCE0',
'american-silver': '#CBCDD1',
+ 'raisin-black': '#202124', | We have named 'raisin-black': '#212121', on line#53 |
ps-analysis-tool | github_2023 | others | 87 | GoogleChromeLabs | mohdsayed | @@ -52,10 +57,13 @@ module.exports = {
primary: '#FFF',
secondary: '#E5E7EB',
tertiary: '#CBD5E1',
+ 'royal-blue': '#3871E0',
'anti-flash-white': '#F1F3F4',
gainsboro: '#DADCE0',
'american-silver': '#CBCDD1',
+ 'raisin-black': '#202124',
'selected-background-co... | Use capital letters for consistency. |
ps-analysis-tool | github_2023 | typescript | 87 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,107 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Please import `useState` |
ps-analysis-tool | github_2023 | typescript | 87 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,107 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Timeout should be cleared on unmount. Roughly something like this.
```js
const timeoutRef = useRef<number | null>(null);
const handleClose = useCallback(() => {
document.body.style.overflow = open ? 'auto' : 'hidden';
setStartAnimation(true);
timeoutRef.current = window.setTimeout(() => {
... |
ps-analysis-tool | github_2023 | typescript | 91 | GoogleChromeLabs | mohdsayed | @@ -167,15 +167,3 @@ chrome.windows.onRemoved.addListener(async (windowId) => {
chrome.runtime.onInstalled.addListener(async () => {
await chrome.storage.local.clear();
});
-
-/**
- * Listen to changes in cookie store and sync extension local store
- * when any cookies are delted ( through application tab in devto... | @ayushnirwal How would we sync the cookie deletion without this? Have you thought of an alternative? |
ps-analysis-tool | github_2023 | typescript | 54 | GoogleChromeLabs | ayushnirwal | @@ -0,0 +1,45 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
infoKey: PSInfoKeyType;
``` |
ps-analysis-tool | github_2023 | typescript | 54 | GoogleChromeLabs | ayushnirwal | @@ -0,0 +1,141 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ```suggestion
onClick={ ()=>{setIsOpen(!isOpen)} }
``` |
ps-analysis-tool | github_2023 | typescript | 54 | GoogleChromeLabs | ayushnirwal | @@ -0,0 +1,143 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | I think rather than importing the data required to display we should fetch it like we are fetching the [cookieDB](https://github.com/GoogleChromeLabs/ps-analysis-tool/blob/develop/packages/extension/src/utils/fetchCookieDictionary.ts). In the future, any static data can then be fetched from a server with just a url cha... |
ps-analysis-tool | github_2023 | typescript | 54 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,143 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Shouldn't we reduce the code repetition by keeping the repeated `li` in a function? Something like this
```js
const renderLink = (label: string, url: string) => (
<li className="py-4">
<div className="flex items-center">
<div className="flex-1 min-w-0">
<p className="text-sm font-m... |
ps-analysis-tool | github_2023 | typescript | 54 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,53 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | Is it being used? |
ps-analysis-tool | github_2023 | typescript | 54 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,53 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | Is it being used? |
ps-analysis-tool | github_2023 | typescript | 54 | GoogleChromeLabs | mohdsayed | @@ -66,12 +67,12 @@ describe('should match the json file data with the component', () => {
const closeButton = await screen.findByText('Close');
expect(closeButton).toBeInTheDocument();
- if (output.proposal) {
+ if (parseUrl(output.proposal)) { | These look unnecessary when we have control over the data. |
ps-analysis-tool | github_2023 | others | 82 | GoogleChromeLabs | mohdsayed | @@ -81,6 +82,7 @@
"postcss-loader": "^7.3.3",
"prettier": "^2.8.8",
"prop-types": "^15.8.1",
+ "re-resizable": "^6.9.9", | Shouldn't these be under `dependencies` as they are not being used for development only? Also since they are being used for the extension package, they should be added to `packages/extension/package.json` instead |
ps-analysis-tool | github_2023 | typescript | 82 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,55 @@
+/* | Could you tell me the reason for keeping these components inside stories? Are they not supposed to be real components that will be used in the devTools? |
ps-analysis-tool | github_2023 | others | 82 | GoogleChromeLabs | mohdsayed | @@ -108,5 +108,9 @@
"type": "module",
"workspaces": [
"packages/*"
- ]
+ ],
+ "dependencies": {
+ "@tanstack/react-table": "^8.9.3",
+ "re-resizable": "^6.9.9" | These should be the extension's dependencies. |
ps-analysis-tool | github_2023 | typescript | 82 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,61 @@
+/* | Maybe there isn't a need for a components folder, as we already in component folder. It can be inside So `components/details.tsx` => `details/index.tsx`. Isn't there a test for it? |
ps-analysis-tool | github_2023 | typescript | 82 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,165 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ❤️ |
ps-analysis-tool | github_2023 | typescript | 88 | GoogleChromeLabs | mohdsayed | @@ -16,16 +16,25 @@
/**
* Check if cookie is compliant with IBC(Incrementally Better Cookies) proposal.
- * @param samesite SameSite attribute value.
- * @param secure Secure attribute value.
- * @param chromeCookieStoreHasCookie True if cookie is stored in Chrome store.
+ * @param samesite Cookie SameSite attribu... | While we are here, let's add a test for this function. |
ps-analysis-tool | github_2023 | typescript | 88 | GoogleChromeLabs | mohdsayed | @@ -16,16 +16,25 @@
/**
* Check if cookie is compliant with IBC(Incrementally Better Cookies) proposal.
- * @param samesite SameSite attribute value.
- * @param secure Secure attribute value.
- * @param chromeCookieStoreHasCookie True if cookie is stored in Chrome store.
+ * @param samesite Cookie SameSite attribu... | What are those cases when a cookie is not set in the Cookie Store? Is it only about `SameSite` or something else too? Please add those details to the PR description. |
ps-analysis-tool | github_2023 | typescript | 88 | GoogleChromeLabs | mohdsayed | @@ -164,3 +167,11 @@ chrome.windows.onRemoved.addListener(async (windowId) => {
chrome.runtime.onInstalled.addListener(async () => {
await chrome.storage.local.clear();
});
+
+chrome.cookies.onChanged.addListener(
+ async (changeInfo: chrome.cookies.CookieChangeInfo) => {
+ if (changeInfo.cause === 'explicit' ... | ```suggestion
if (changeInfo.cause === 'explicit' && changeInfo.removed) {
``` |
ps-analysis-tool | github_2023 | typescript | 88 | GoogleChromeLabs | mohdsayed | @@ -52,11 +55,14 @@ const parseResponseCookieHeader = async (
analytics = findAnalyticsMatch(parsedCookie.name, dictionary);
}
+ const _isFirstParty = isFirstParty(parsedCookie.domain || '', tabUrl);
+
return {
parsedCookie,
analytics,
url,
headerType: 'response',
+ isFirstParty: _i... | 👍 This will be required for the filtering work too. |
ps-analysis-tool | github_2023 | typescript | 88 | GoogleChromeLabs | mohdsayed | @@ -76,6 +76,20 @@ const CookieStore = {
});
},
+ /**
+ * Deletes a cookie
+ * @param {string} cookieName Name of the cookie.
+ */
+ async deleteCookie(cookieName: string) {
+ const storage = await chrome.storage.local.get();
+
+ Object.values(storage).forEach((tabData) => {
+ delete tabDat... | Add test coverage for it? |
ps-analysis-tool | github_2023 | typescript | 83 | GoogleChromeLabs | mohdsayed | @@ -29,20 +29,47 @@ const CookieStore = {
const newCookies: { [key: string]: CookieData } = {};
for (const cookie of cookies) {
- if (cookie) {
- newCookies[cookie.parsedCookie.name] = cookie;
+ if (cookie.parsedCookie.name) {
+ if (Object.keys(newCookies).includes(cookie.parsedCooki... | Add some test coverage for it? |
ps-analysis-tool | github_2023 | others | 80 | GoogleChromeLabs | mohdsayed | @@ -45,15 +45,7 @@ const commonConfig = {
loader: 'postcss-loader',
options: {
postcssOptions: {
- plugins: [
- [
- 'tailwindcss',
- {
- config: './packages/extension/tailwind.config.cjs',... | Is it required by the storybook to move it from Webpack config to a separate `postcss.config.cjs` file? |
ps-analysis-tool | github_2023 | others | 64 | GoogleChromeLabs | mohdsayed | @@ -4863,26 +4863,26 @@
],
"lidid": [
{
- "platform": "liadm.com",
+ "platform": "LiveIntent", | Why these have been updated? |
ps-analysis-tool | github_2023 | typescript | 58 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,26 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | This can also be written as
```js
export function getCookie(name: string, url: string) {
return chrome.cookies.get({ name, url });
}
```
but I wonder why do we need a utility function for this? Can we directly use `await chrome.cookies.get({ name, url });` ? |
ps-analysis-tool | github_2023 | typescript | 58 | GoogleChromeLabs | mohdsayed | @@ -127,6 +157,48 @@ const CookieDetails = ({ data, analytics }: CookieDetailsProps) => {
{analytics?.retention}
</p>
</div>
+ <div className="flex items-center py-2 text-[#808080]"> | Please add `#808080` to the tailwind color configuration or use the available ones. |
ps-analysis-tool | github_2023 | typescript | 58 | GoogleChromeLabs | mohdsayed | @@ -127,6 +157,48 @@ const CookieDetails = ({ data, analytics }: CookieDetailsProps) => {
{analytics?.retention}
</p>
</div>
+ <div className="flex items-center py-2 text-[#808080]">
+ <h1 className="w-1/4 font-semibold text-s">
+ <abbr title="IBC (Incremental... | "and requiring explicit" => "and requiring an explicit"
"If any of conditions" => "If any of the conditions" |
ps-analysis-tool | github_2023 | typescript | 58 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,153 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ```suggestion
return {
name,
value,
domain,
path,
secure,
httponly,
samesite,
expires,
} as ParsedCookie;
``` |
ps-analysis-tool | github_2023 | typescript | 58 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,153 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ```suggestion
if (value === 'no_restriction') {
value = 'none';
} else if (value === 'unspecified') {
value = '';
}
```
Please avoid nested ternary expressions |
ps-analysis-tool | github_2023 | typescript | 58 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,36 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
export async function findPreviousCookieDataObject(
``` |
ps-analysis-tool | github_2023 | typescript | 58 | GoogleChromeLabs | mohdsayed | @@ -30,31 +36,38 @@ import findAnalyticsMatch from './findAnalyticsMatch';
* @param {string} url Cookie URL (URL of the server which is setting/updating cookies).
* @param {string} value header value
* @param {CookieDatabase} dictionary Dictionary from open cookie database
- * @returns {CookieData[]} Parsed cooki... | What is the use of this variable? Can we directly return ? |
ps-analysis-tool | github_2023 | others | 55 | GoogleChromeLabs | ayushnirwal | @@ -15,6 +15,11 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"simple-cookie": "^1.0.15",
- "use-context-selector": "^1.4.1"
+ "tldts": "^6.0.8",
+ "use-context-selector": "^1.4.1",
+ "victory": "^36.6.11"
+ },
+ "devDependencies":{
+ "@tailwindcss/line-clamp": "^0.4.4" | line-clamp plugin has been integrated to core tailwind package. This can be removed now. |
ps-analysis-tool | github_2023 | others | 55 | GoogleChromeLabs | ayushnirwal | @@ -137,7 +137,8 @@
},
"rules": {
"eslint-comments/require-description": "off",
- "@typescript-eslint/no-var-requires": "off"
+ "@typescript-eslint/no-var-requires": "off",
+ "no-console": "off" | Why turn off "no-console"? |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,86 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | Can it be written something like this?
```js
for (const cookie of cookieList) {
const { analytics, parsedCookie: { domain } } = cookie;
const isFirstPartyCookie = isFirstParty(domain, tabUrl);
const category = analytics?.category?.toLowerCase();
if (isFirstPartyCookie) {
stats.firstPa... |
ps-analysis-tool | github_2023 | others | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>CAT Popup</title>
+ <meta charset='UTF-8'>
+ <meta http-equiv='X-UA-Compatible' content='ie=edge'> | Any plans to run it in edge :D ? |
ps-analysis-tool | github_2023 | others | 53 | GoogleChromeLabs | mohdsayed | @@ -127,4 +127,26 @@ const devTools = {
...commonConfig,
};
-module.exports = [root, devTools];
+const popup = {
+ entry: {
+ index: './packages/extension/src/view/popup/index.tsx',
+ },
+ output: {
+ path: path.resolve(__dirname, './dist/extension/popup'),
+ filename: 'index.js',
+ },
+ plugins: [
... | ```suggestion
title: 'PSAT Popup',
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
<div className="w-2 h-2 rounded-full flex items-center justify-center bg-white" />
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
{legendItemList.map(({ label, count, color }, index) => (
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,46 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
interface PieChartProps {
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,46 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
labels={() => ''}
```
My text editor shows that `label` is expecting a string or a number. |
ps-analysis-tool | github_2023 | others | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <title>CAT Devtool</title> | ```suggestion
<title>PSAT DevTool</title>
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,169 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Should this not be inside a `useEffect` ?
```js
useEffect(() => {
(async () => {
if (!cookies) {
await chrome.tabs.reload();
}
})();
}, [cookies]);
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,169 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Sorry, I feel "unknown" doesn't sound too good as a category. Shall we use `Uncategorised`, it's making more sense. ( WordPress also uses "Uncategorised" for uncategorized posts. ) |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,169 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ```suggestion
<p className="font-bold text-lg">No cookies found</p>
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,22 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
functional: '#00B04C',
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | We haven't kept more than one component in a single file. Let's create a separate file for it for consistency. |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,52 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
<p className="text-chart-label text-xs">{count}</p>
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -25,6 +25,11 @@ describe('local store: updateStorage', () => {
beforeAll(() => {
globalThis.chrome = {
+ //@ts-ignore local does not implementations of other properties
+ action: {
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
+ setBadgeText: async () => {}, | Create `noop` util? |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -25,6 +25,11 @@ describe('local store: updateStorage', () => {
beforeAll(() => {
globalThis.chrome = {
+ //@ts-ignore local does not implementations of other properties | typo |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -68,7 +68,18 @@ const updateStorage = async (
}
}
}
-
+ try {
+ if (Object.keys(newStorageValue[tabId].cookies || {}).length > 0) {
+ await chrome.action.setBadgeText({
+ tabId: parseInt(tabId),
+ text: Object.keys(
+ newStorageValue[tabId].cookies || {}
+ ).leng... | ```suggestion
const tabCookies = newStorageValue[tabId].cookies || {};
const numCookies = Object.keys(tabCookies).length;
if (numCookies > 0) {
await chrome.action.setBadgeText({
tabId: parseInt(tabId),
text: numCookies.toString(),
});
}
``` |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,181 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Shall we use capital letters for all static constants like `EMPTY_STATS` in the project? |
ps-analysis-tool | github_2023 | typescript | 53 | GoogleChromeLabs | mohdsayed | @@ -25,6 +25,9 @@ import {
fetchDictionary,
} from '../utils/fetchCookieDictionary';
+//clear data from previous sessions or version of the extention
+chrome.storage.local.clear(); | Hmm, another clearing without any event listener when we have one on `chrome.runtime.onInstalled`? This may create confusion. Which event do we want to cover? Can we put it as part of their callbacks like `chrome.windows.onCreated `? |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,75 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
/**
* Internal dependencies.
*/
import { type CookieAnalytics } from '../../../../../../utils/fetchCookieDictionary';
``` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/** | Probably your text editor automatically adds empty lines here. |
ps-analysis-tool | github_2023 | others | 46 | GoogleChromeLabs | mohdsayed | @@ -29,6 +29,7 @@
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@svgr/webpack": "^8.0.1",
+ "@tailwindcss/line-clamp": "^0.4.4", | Should this not be a dependency of the extension's `package.json.` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,166 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ```suggestion
interface CookieDetailsProps {
``` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,166 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Please keep all hooks together in the beginning. |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,166 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ```suggestion
onClick={openGDPRPortal}
```
```js
const openGDPRPortal = () => {
if (analytics?.gdprUrl) {
chrome.tabs.create({ url: analytics?.gdprUrl });
}
};
```` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -21,23 +21,35 @@ import React from 'react';
/**
* Internal dependencies.
*/
-import { type CookieData } from '../../../../../localStore';
+import { type CookieData } from '../../../../../../localStore';
import ListItem from './listItem';
interface ICoookieList {
cookies: {
[key: string]: CookieData;... | ```suggestion
}: CoookieListProps) => (
``` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,39 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | Where is it being used? |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,154 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | ```suggestion
it('should show a cookie card with the information on first cookie in the list', () => {
``` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,154 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | Did you want to do ?
```js
expect(within(card).getByText(`${thirdCookie.parsedCookie.name}`)).toBeInTheDocument();
``` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -54,7 +54,14 @@ export const Provider = ({ children }: PropsWithChildren) => {
const tabData = await chrome.storage.local.get();
- setState(tabData[tabId]);
+ if (
+ tabData &&
+ tabData[tabId] &&
+ tabData[tabId].cookies &&
+ tabData[tabId].url
+ ) {
+ setState(tabData[tab... | ```suggestion
const tabInfo = tabData?.[tabId];
if (tabInfo?.cookies && tabInfo?.url) {
setState(tabInfo);
}
``` |
ps-analysis-tool | github_2023 | typescript | 46 | GoogleChromeLabs | mohdsayed | @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+ | ☝️ |
ps-analysis-tool | github_2023 | typescript | 49 | GoogleChromeLabs | ayushnirwal | @@ -0,0 +1,80 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | We should add test case where cookie domain is undefined |
ps-analysis-tool | github_2023 | others | 25 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,120 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by ... | @ayushnirwal Temporarily updated the url to fetch the updated cookie database until https://github.com/jkwakman/Open-Cookie-Database/pull/32 is merged |
ps-analysis-tool | github_2023 | others | 25 | GoogleChromeLabs | mohdsayed | @@ -18,5 +18,11 @@
},
"action": {
"default_icon": "icons/icon-48.png"
- }
+ },
+ "web_accessible_resources": [
+ {
+ "resources": ["data/*.json"], | Shouldn't this be `third_party/data/*.json` now? |
ps-analysis-tool | github_2023 | typescript | 25 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,45 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
gdprUrl: string;
``` |
ps-analysis-tool | github_2023 | typescript | 25 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,60 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | Lets add description |
ps-analysis-tool | github_2023 | typescript | 25 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,60 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
let analytics: CookieAnalytics | null = null;
Object.keys(dictionary).every((dictionaryKey) => {
``` |
ps-analysis-tool | github_2023 | typescript | 25 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,60 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | ```suggestion
return analytics;
};
export default findAnalyticsMatch;
``` |
ps-analysis-tool | github_2023 | typescript | 25 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,60 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by a... | Please add description. |
ps-analysis-tool | github_2023 | javascript | 15 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,21 @@
+module.exports = function (api) { | Though Currently, we only have two packages, namely `cli` and `extension`, in the packages folder. However, we created this folder with the intention of potentially adding more packages in the future. Therefore, I believe it would be ideal to have these configuration files in the root folder instead. By doing so, we ca... |
ps-analysis-tool | github_2023 | others | 15 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,66 @@
+{
+ "name": "@cookie-analysis-tool/extension",
+ "version": "0.0.1",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "dev": "webpack --config webpack.config.cjs --watch",
+ "build": "cross-env NODE_ENV=production webpack --config webpack.config.cjs",
+ "serve": "webpack serve... | Looks like `scripts/update-cookie-db.js` is not included in this PR |
ps-analysis-tool | github_2023 | others | 15 | GoogleChromeLabs | mohdsayed | @@ -0,0 +1,66 @@
+{
+ "name": "@cookie-analysis-tool/extension",
+ "version": "0.0.1",
+ "description": "",
+ "main": "index.js",
+ "scripts": {
+ "dev": "webpack --config webpack.config.cjs --watch",
+ "build": "cross-env NODE_ENV=production webpack --config webpack.config.cjs",
+ "serve": "webpack serve... | I think they are not being used yet. |
chrome-for-testing | github_2023 | others | 112 | GoogleChromeLabs | OrKoN | @@ -0,0 +1 @@
+<!DOCTYPE html><html lang=en><meta charset=utf-8><title>Chrome for Testing dashboard + API directory listing</title><meta content="width=device-width" name=viewport><style>html{font:1rem/1.6 sans-serif}a{display:block}</style><ul><li><a href=channels-to-versions.json><code>channels-to-versions.json</code... | is it meant to be checked in? |
chrome-for-testing | github_2023 | others | 110 | GoogleChromeLabs | mathiasbynens | @@ -216,3 +216,12 @@ await writeJsonFile(
'./data/latest-patch-versions-per-build-with-downloads.json',
addDownloads(latestPatchVersionsPerBuild, 'builds')
);
+
+const writePerVersionFiles = async () => {
+ await Promise.all(addDownloads(knownGoodVersions, 'versions').versions.map((release) => {
+ const fileNa... | ```suggestion
await writePerVersionFiles();
``` |
chrome-for-testing | github_2023 | others | 15 | GoogleChromeLabs | thiagowfx | @@ -28,13 +28,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | What's the advantage of using hash over major version? |
chrome-for-testing | github_2023 | others | 12 | GoogleChromeLabs | OrKoN | @@ -8,18 +8,18 @@
},
"Beta": {
"channel": "Beta",
- "version": "114.0.5735.35",
+ "version": "114.0.5735.26", | do you know why versions got downgraded? |
ipyreact | github_2023 | typescript | 55 | widgetti | maartenbreddels | @@ -30,3 +35,68 @@ export class ErrorBoundary extends React.Component {
return this.props.children;
}
}
+
+export function JupyterWidget({
+ widget,
+ view,
+}: {
+ widget: WidgetModel;
+ view: DOMWidgetView;
+}) {
+ const [element, setElement] = React.useState<HTMLElement | null>(null);
+
+ React.useLay... | vue? :) |
ipyreact | github_2023 | others | 14 | widgetti | maartenbreddels | @@ -2,75 +2,55 @@
"cells": [
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": null,
"id": "aba8b4d5-199f-4fe0-97a2-5a2a3f43cbf2",
"metadata": {},
"outputs": [],
"source": [
"import ipyreact\n",
- "from traitlets import Bool, Int, observe"
+ "from traitlets imp... | I think the `check_is_even` should not return a string, but a boolean, the widget should translate that to a string, sth like:
```suggestion
" self.message = "Yes ✅✅✅\" if check_is_even(self.count) else "No 🧊🧊🧊\"\n",
``` |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,732 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | misspelling, should be `_esm string`
Also maybe an explanation for why the term `_esm` |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | try
```
"# This line is for JupyterLite (sometimes this operation takes a long time and hangs, restart the kernel and run this cell again)"
```
or
```
"# This line is for JupyterLite (if this takes more than 10? seconds, something probably hung, restart the kernel and run this cell again)"
```
or
```
"# Thi... |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | Great here we can see react `TSX` code rendering in the jupyter notebook. |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | Let's **style** this with CSS. |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | Is injecting CSS like that the preferred method of CSS styling? Is there any scoping of CSS rules to a cell? I don't know, genuinely asking. |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | Maybe an explanation along the lines of
Inline JS and CSS is great for examples and playing around. For more serious development you probably want to use a text editor on separate files that are automatically reloaded. This way you get the normal syntax hilighting that your familiar with. |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | Styling bug, this isn't being recognized as a second list item |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | Here we have an example of a button that changes the postion using traitlets |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | This will throw a python error as my_width expects an integer.
throwing apython error is a feature. It's easier to understand than the corresponding JS error or worse non functioning CSS that would occur otherwise. This might be worth mentioning for users. |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | "Note that for for every trait <name> there is a `<name> + on_<name>` pair of values available for props of the component on the react side"
the `on_<name>` value is a setter function equivalent to what you get from react's `useState`.
That is still awkwardly worded.
Draw the parallel between val/on_val to... |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | In my experience they are the same. I only use `change["new"]` when I also need to reference `change["old"]` |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | What part isn't straightforward, the `super` call? maybe explicitly mention that, along with `super` being required. |
ipyreact | github_2023 | others | 11 | widgetti | paddymul | @@ -1,6 +1,11 @@
# ipyreact
+Binder Link:
+https://mybinder.org/v2/gh/kolibril13/ipyreact/binder?labpath=examples%2Ffull_tutorial.ipynb
+(needs to be updated to the main repo)
+
+
React for ipywidgets that just works. No webpack, no npm, no hassle. Just write jsx, tsx and python.
| This tutorial will walk you through the building blocks of building a complete ipywidget with react. From the small beginning steps, to styling, to interactivty through react. Along the way you will see best practices for bridging the gap from react practicers to jupyter notebook practices. By the end you will be on... |
ipyreact | github_2023 | others | 11 | widgetti | maartenbreddels | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | ```suggestion
"}"
``` |
ipyreact | github_2023 | others | 11 | widgetti | maartenbreddels | @@ -0,0 +1,882 @@
+{
+ "cells": [
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "d8ec9a76-0819-463d-8955-55789ee36400",
+ "metadata": {},
+ "source": [
+ "# Ipyreact walkthrough"
+ ]
+ },
+ {
+ "attachments": {},
+ "cell_type": "markdown",
+ "id": "083f2dc7-c0ec-482f-a720-aa2896ad1... | ```suggestion
"1. curly brackets from f-strings will collide with the curly brackets from JavaScript/TypeScript. \n",
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.