author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
129,190
04.03.2022 12:00:29
0
073083fa62b22ca383053e1dbc524719d772416e
[services] Backup - Add Tools Summary: Adding `Tools` with `getCurrentTimestamp` which will be needed for creating backup items. Depends on D3158 Test Plan: Backup service builds Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Subscribers: benschac, ashoat, palys-swm, Adrian, atul
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Tools.cpp", "diff": "+#include \"Tools.h\"\n+\n+#include <chrono>\n+\n+namespace comm {\n+namespace network {\n+\n+uint64_t getCurrentTimestamp() {\n+ using namespace std::chrono;\n+ return duration_cast<milliseconds>(system_clock::now().time_since_epoch())\n+ .count();\n+}\n+\n+} // namespace network\n+} // namespace comm\n" }, { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Tools.h", "diff": "+#pragma once\n+\n+#include <cstdint>\n+\n+namespace comm {\n+namespace network {\n+\n+uint64_t getCurrentTimestamp();\n+\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add Tools Summary: Adding `Tools` with `getCurrentTimestamp` which will be needed for creating backup items. Depends on D3158 Test Plan: Backup service builds Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Reviewed By: palys-swm, ashoat Subscribers: benschac, ashoat, palys-swm, Adrian, atul Differential Revision: https://phabricator.ashoat.com/D3159
129,190
04.03.2022 12:02:29
0
d97608371e008bb4988c633569611ba98511a872
[services] Backup - Add DB test for Backup Summary: Adding test for database operations on `BackupItem`s Depends on D3160 Test Plan: ``` cd services yarn test-backup-service ``` Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Subscribers: benschac, ashoat, palys-swm, Adrian, atul
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/CMakeLists.txt", "new_path": "services/backup/docker-server/contents/server/CMakeLists.txt", "diff": "@@ -27,6 +27,10 @@ set(gRPC_BUILD_GRPC_RUBY_PLUGIN OFF)\nset(gRPC_BUILD_GRPC_PYTHON_PLUGIN OFF)\nset(gRPC_BUILD_GRPC_CSHARP_PLUGIN OFF)\n+if ($ENV{COMM_TEST_SERVICES} MATCHES 1)\n+ add_compile_definitions(COMM_TEST_SERVICES)\n+endif()\n+\n# Find gRPC installation\n# Looks for gRPCConfig.cmake file installed by gRPC's cmake installation.\nfind_package(gRPC CONFIG REQUIRED)\n" }, { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/test/DatabaseManagerTest.cpp", "diff": "+#include <gtest/gtest.h>\n+\n+#include \"DatabaseManager.h\"\n+#include \"Tools.h\"\n+\n+#include <iostream>\n+\n+#include <memory>\n+#include <string>\n+#include <vector>\n+\n+using namespace comm::network::database;\n+\n+class DatabaseManagerTest : public testing::Test {\n+protected:\n+ virtual void SetUp() {\n+ Aws::InitAPI({});\n+ }\n+\n+ virtual void TearDown() {\n+ Aws::ShutdownAPI({});\n+ }\n+};\n+\n+std::string generateName(const std::string prefix = \"\") {\n+ return prefix + \"-\" + std::to_string(comm::network::getCurrentTimestamp());\n+}\n+\n+TEST_F(DatabaseManagerTest, TestOperationsOnBackupItems) {\n+ auto generateBackupItem = [](const std::string &userID,\n+ const std::string &backupID) {\n+ return BackupItem(\n+ userID,\n+ backupID,\n+ comm::network::getCurrentTimestamp(),\n+ \"xxx\",\n+ \"xxx\",\n+ {\"\"});\n+ };\n+\n+ const std::string userID = generateName(\"user001\");\n+\n+ std::vector<std::string> backupIDs = {\"backup001\", \"backup002\", \"backup003\"};\n+ for (const std::string &backupID : backupIDs) {\n+ DatabaseManager::getInstance().putBackupItem(\n+ generateBackupItem(userID, backupID));\n+ }\n+\n+ std::shared_ptr<BackupItem> item;\n+ while (!backupIDs.empty()) {\n+ item = DatabaseManager::getInstance().findLastBackupItem(userID);\n+ EXPECT_NE(item, nullptr);\n+ EXPECT_EQ(item->getBackupID(), backupIDs.back());\n+ backupIDs.pop_back();\n+ DatabaseManager::getInstance().removeBackupItem(item);\n+ };\n+ EXPECT_EQ(DatabaseManager::getInstance().findLastBackupItem(userID), nullptr);\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add DB test for Backup Summary: Adding test for database operations on `BackupItem`s Depends on D3160 Test Plan: ``` cd services yarn test-backup-service ``` Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Reviewed By: palys-swm, ashoat Subscribers: benschac, ashoat, palys-swm, Adrian, atul Differential Revision: https://phabricator.ashoat.com/D3161
129,190
04.03.2022 12:03:57
0
4d4958bd27adf003ba25c751438cd587214f3621
[services] Backup - Add DB operations for Logs Summary: Database operations for `LogItem`s Depends on D3161 Test Plan: Backup service still builds Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Subscribers: benschac, ashoat, palys-swm, Adrian, atul
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseManager.cpp", "new_path": "services/backup/docker-server/contents/server/src/DatabaseManager.cpp", "diff": "@@ -115,6 +115,73 @@ void DatabaseManager::removeBackupItem(std::shared_ptr<BackupItem> item) {\n}\n}\n+void DatabaseManager::putLogItem(const LogItem &item) {\n+ Aws::DynamoDB::Model::PutItemRequest request;\n+ request.SetTableName(LogItem::tableName);\n+ request.AddItem(\n+ LogItem::FIELD_BACKUP_ID,\n+ Aws::DynamoDB::Model::AttributeValue(item.getBackupID()));\n+ request.AddItem(\n+ LogItem::FIELD_LOG_ID,\n+ Aws::DynamoDB::Model::AttributeValue(item.getLogID()));\n+ request.AddItem(\n+ LogItem::FIELD_PERSISTED_IN_BLOB,\n+ Aws::DynamoDB::Model::AttributeValue(\n+ std::to_string(item.getPersistedInBlob())));\n+ request.AddItem(\n+ LogItem::FIELD_VALUE,\n+ Aws::DynamoDB::Model::AttributeValue(item.getValue()));\n+ request.AddItem(\n+ LogItem::FIELD_ATTACHMENT_HOLDERS,\n+ Aws::DynamoDB::Model::AttributeValue(item.getAttachmentHolders()));\n+\n+ this->innerPutItem(std::make_shared<LogItem>(item), request);\n+}\n+\n+std::vector<std::shared_ptr<LogItem>>\n+DatabaseManager::findLogItemsForBackup(const std::string &backupID) {\n+ std::vector<std::shared_ptr<database::LogItem>> result;\n+ std::shared_ptr<LogItem> item = createItemByType<LogItem>();\n+\n+ Aws::DynamoDB::Model::QueryRequest req;\n+ req.SetTableName(LogItem::tableName);\n+ req.SetKeyConditionExpression(item->getPrimaryKey() + \" = :valueToMatch\");\n+\n+ AttributeValues attributeValues;\n+ attributeValues.emplace(\":valueToMatch\", backupID);\n+\n+ req.SetExpressionAttributeValues(attributeValues);\n+\n+ const Aws::DynamoDB::Model::QueryOutcome &outcome =\n+ getDynamoDBClient()->Query(req);\n+ if (!outcome.IsSuccess()) {\n+ throw std::runtime_error(outcome.GetError().GetMessage());\n+ }\n+ const Aws::Vector<AttributeValues> &items = outcome.GetResult().GetItems();\n+ for (auto &item : items) {\n+ result.push_back(std::make_shared<database::LogItem>(item));\n+ }\n+\n+ return result;\n+}\n+\n+void DatabaseManager::removeLogItem(std::shared_ptr<LogItem> item) {\n+ Aws::DynamoDB::Model::DeleteItemRequest request;\n+ request.SetTableName(item->getTableName());\n+ request.AddKey(\n+ LogItem::FIELD_BACKUP_ID,\n+ Aws::DynamoDB::Model::AttributeValue(item->getBackupID()));\n+ request.AddKey(\n+ LogItem::FIELD_LOG_ID,\n+ Aws::DynamoDB::Model::AttributeValue(item->getLogID()));\n+\n+ const Aws::DynamoDB::Model::DeleteItemOutcome &outcome =\n+ getDynamoDBClient()->DeleteItem(request);\n+ if (!outcome.IsSuccess()) {\n+ throw std::runtime_error(outcome.GetError().GetMessage());\n+ }\n+}\n+\n} // namespace database\n} // namespace network\n} // namespace comm\n" }, { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseManager.h", "new_path": "services/backup/docker-server/contents/server/src/DatabaseManager.h", "diff": "@@ -40,6 +40,11 @@ public:\nvoid putBackupItem(const BackupItem &item);\nstd::shared_ptr<BackupItem> findLastBackupItem(const std::string &userID);\nvoid removeBackupItem(std::shared_ptr<BackupItem> item);\n+\n+ void putLogItem(const LogItem &item);\n+ std::vector<std::shared_ptr<LogItem>>\n+ findLogItemsForBackup(const std::string &backupID);\n+ void removeLogItem(std::shared_ptr<LogItem> item);\n};\ntemplate <typename T>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add DB operations for Logs Summary: Database operations for `LogItem`s Depends on D3161 Test Plan: Backup service still builds Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Reviewed By: palys-swm, ashoat Subscribers: benschac, ashoat, palys-swm, Adrian, atul Differential Revision: https://phabricator.ashoat.com/D3175
129,190
04.03.2022 12:04:26
0
8b36cb33cbb66de41097604fc7af310345fd3e03
[services] Backup - Add DB tests for Logs Summary: Add tests for database operations for `LogItem`s Depends on D3175 Test Plan: ``` cd services yarn test-backup-service ``` Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Subscribers: benschac, ashoat, palys-swm, Adrian, atul
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/test/DatabaseManagerTest.cpp", "new_path": "services/backup/docker-server/contents/server/test/DatabaseManagerTest.cpp", "diff": "@@ -26,9 +26,8 @@ std::string generateName(const std::string prefix = \"\") {\nreturn prefix + \"-\" + std::to_string(comm::network::getCurrentTimestamp());\n}\n-TEST_F(DatabaseManagerTest, TestOperationsOnBackupItems) {\n- auto generateBackupItem = [](const std::string &userID,\n- const std::string &backupID) {\n+BackupItem\n+generateBackupItem(const std::string &userID, const std::string &backupID) {\nreturn BackupItem(\nuserID,\nbackupID,\n@@ -36,8 +35,13 @@ TEST_F(DatabaseManagerTest, TestOperationsOnBackupItems) {\n\"xxx\",\n\"xxx\",\n{\"\"});\n- };\n+}\n+\n+LogItem generateLogItem(const std::string &backupID, const std::string &logID) {\n+ return LogItem(backupID, logID, false, \"xxx\", {\"\"});\n+}\n+TEST_F(DatabaseManagerTest, TestOperationsOnBackupItems) {\nconst std::string userID = generateName(\"user001\");\nstd::vector<std::string> backupIDs = {\"backup001\", \"backup002\", \"backup003\"};\n@@ -56,3 +60,44 @@ TEST_F(DatabaseManagerTest, TestOperationsOnBackupItems) {\n};\nEXPECT_EQ(DatabaseManager::getInstance().findLastBackupItem(userID), nullptr);\n}\n+\n+TEST_F(DatabaseManagerTest, TestOperationsOnLogItems) {\n+ const std::string backupID1 = generateName(\"backup001\");\n+ const std::string backupID2 = generateName(\"backup002\");\n+\n+ std::vector<std::string> logIDs1 = {\"log001\", \"log002\", \"log003\"};\n+ for (const std::string &logID : logIDs1) {\n+ DatabaseManager::getInstance().putLogItem(\n+ generateLogItem(backupID1, logID));\n+ }\n+ std::vector<std::string> logIDs2 = {\"log021\", \"log022\"};\n+ for (const std::string &logID : logIDs2) {\n+ DatabaseManager::getInstance().putLogItem(\n+ generateLogItem(backupID2, logID));\n+ }\n+\n+ std::vector<std::shared_ptr<LogItem>> items1 =\n+ DatabaseManager::getInstance().findLogItemsForBackup(backupID1);\n+\n+ std::vector<std::shared_ptr<LogItem>> items2 =\n+ DatabaseManager::getInstance().findLogItemsForBackup(backupID2);\n+\n+ EXPECT_EQ(items1.size(), 3);\n+ EXPECT_EQ(items2.size(), 2);\n+\n+ for (size_t i = 0; i < items1.size(); ++i) {\n+ EXPECT_EQ(logIDs1.at(i), items1.at(i)->getLogID());\n+ DatabaseManager::getInstance().removeLogItem(items1.at(i));\n+ }\n+ EXPECT_EQ(\n+ DatabaseManager::getInstance().findLogItemsForBackup(backupID1).size(),\n+ 0);\n+\n+ for (size_t i = 0; i < items2.size(); ++i) {\n+ EXPECT_EQ(logIDs2.at(i), items2.at(i)->getLogID());\n+ DatabaseManager::getInstance().removeLogItem(items2.at(i));\n+ }\n+ EXPECT_EQ(\n+ DatabaseManager::getInstance().findLogItemsForBackup(backupID2).size(),\n+ 0);\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add DB tests for Logs Summary: Add tests for database operations for `LogItem`s Depends on D3175 Test Plan: ``` cd services yarn test-backup-service ``` Reviewers: palys-swm, geekbrother, varun, ashoat, jimpo Reviewed By: palys-swm, ashoat Subscribers: benschac, ashoat, palys-swm, Adrian, atul Differential Revision: https://phabricator.ashoat.com/D3176
129,190
04.03.2022 12:05:35
0
051afff095af6ca5b56f528658a08f597208ef67
[services] Backup - Reuse remove logic Summary: Reuse `innerRemoveItem` for BackupItem`s and `LogItem`s Depends on D3177 Test Plan: ``` cd services yarn test-backup-service ``` Reviewers: palys-swm, geekbrother, varun, ashoat Subscribers: benschac, ashoat, palys-swm, Adrian, atul
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseManager.cpp", "new_path": "services/backup/docker-server/contents/server/src/DatabaseManager.cpp", "diff": "@@ -28,14 +28,19 @@ void DatabaseManager::innerPutItem(\n}\n}\n-void DatabaseManager::innerRemoveItem(\n- const Item &item,\n- const std::string &key) {\n+void DatabaseManager::innerRemoveItem(const Item &item) {\nAws::DynamoDB::Model::DeleteItemRequest request;\nrequest.SetTableName(item.getTableName());\n+ PrimaryKey pk = item.getPrimaryKey();\n+ PrimaryKeyValue primaryKeyValue = item.getPrimaryKeyValue();\nrequest.AddKey(\n- item.getPrimaryKey().partitionKey,\n- Aws::DynamoDB::Model::AttributeValue(key));\n+ pk.partitionKey,\n+ Aws::DynamoDB::Model::AttributeValue(primaryKeyValue.partitionKey));\n+ if (pk.sortKey != nullptr && primaryKeyValue.sortKey != nullptr) {\n+ request.AddKey(\n+ *pk.sortKey,\n+ Aws::DynamoDB::Model::AttributeValue(*primaryKeyValue.sortKey));\n+ }\nconst Aws::DynamoDB::Model::DeleteItemOutcome &outcome =\ngetDynamoDBClient()->DeleteItem(request);\n@@ -100,20 +105,7 @@ DatabaseManager::findLastBackupItem(const std::string &userID) {\n}\nvoid DatabaseManager::removeBackupItem(std::shared_ptr<BackupItem> item) {\n- Aws::DynamoDB::Model::DeleteItemRequest request;\n- request.SetTableName(item->getTableName());\n- request.AddKey(\n- BackupItem::FIELD_USER_ID,\n- Aws::DynamoDB::Model::AttributeValue(item->getUserID()));\n- request.AddKey(\n- BackupItem::FIELD_BACKUP_ID,\n- Aws::DynamoDB::Model::AttributeValue(item->getBackupID()));\n-\n- const Aws::DynamoDB::Model::DeleteItemOutcome &outcome =\n- comm::network::getDynamoDBClient()->DeleteItem(request);\n- if (!outcome.IsSuccess()) {\n- throw std::runtime_error(outcome.GetError().GetMessage());\n- }\n+ this->innerRemoveItem(*item);\n}\nvoid DatabaseManager::putLogItem(const LogItem &item) {\n@@ -167,20 +159,7 @@ DatabaseManager::findLogItemsForBackup(const std::string &backupID) {\n}\nvoid DatabaseManager::removeLogItem(std::shared_ptr<LogItem> item) {\n- Aws::DynamoDB::Model::DeleteItemRequest request;\n- request.SetTableName(item->getTableName());\n- request.AddKey(\n- LogItem::FIELD_BACKUP_ID,\n- Aws::DynamoDB::Model::AttributeValue(item->getBackupID()));\n- request.AddKey(\n- LogItem::FIELD_LOG_ID,\n- Aws::DynamoDB::Model::AttributeValue(item->getLogID()));\n-\n- const Aws::DynamoDB::Model::DeleteItemOutcome &outcome =\n- getDynamoDBClient()->DeleteItem(request);\n- if (!outcome.IsSuccess()) {\n- throw std::runtime_error(outcome.GetError().GetMessage());\n- }\n+ this->innerRemoveItem(*item);\n}\n} // namespace database\n" }, { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseManager.h", "new_path": "services/backup/docker-server/contents/server/src/DatabaseManager.h", "diff": "@@ -32,7 +32,7 @@ class DatabaseManager {\ntemplate <typename T>\nstd::shared_ptr<T>\ninnerFindItem(Aws::DynamoDB::Model::GetItemRequest &request);\n- void innerRemoveItem(const Item &item, const std::string &key);\n+ void innerRemoveItem(const Item &item);\npublic:\nstatic DatabaseManager &getInstance();\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Reuse remove logic Summary: Reuse `innerRemoveItem` for BackupItem`s and `LogItem`s Depends on D3177 Test Plan: ``` cd services yarn test-backup-service ``` Reviewers: palys-swm, geekbrother, varun, ashoat Reviewed By: palys-swm, ashoat Subscribers: benschac, ashoat, palys-swm, Adrian, atul Differential Revision: https://phabricator.ashoat.com/D3178
129,179
04.03.2022 09:37:08
18,000
5b248e50e2f59df0549f0c3a55855fc2382a3dd5
[web] [fix] update chevron color Summary: chevron color should be shades-of-white-60 per figma in the thread ancestor settings on the chat screen. {F17402} {F17404} Test Plan: double check figma that this is correct Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-ancestors.css", "new_path": "web/chat/chat-thread-ancestors.css", "diff": "@@ -29,6 +29,10 @@ div.ancestorKeyserverName {\nborder-radius: 0px 2px 2px 0px;\n}\n+div.ancestorSeparator {\n+ color: var(--thread-ancestor-separator-color);\n+}\n+\ndiv.ancestorKeyserverOperator {\ndisplay: flex;\ncolumn-gap: 5px;\n" }, { "change_type": "MODIFY", "old_path": "web/theme.css", "new_path": "web/theme.css", "diff": "--thread-ancestor-keyserver-border: var(--shades-black-70);\n--thread-ancestor-color-light: var(--shades-white-70);\n--thread-ancestor-color-dark: var(--shades-black-100);\n+ --thread-ancestor-separator-color: var(--shades-white-60);\n--text-message-default-background: var(--shades-black-80);\n--message-action-tooltip-bg: var(--shades-black-90);\n--thread-menu-bg: var(--shades-black-90);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] update chevron color Summary: chevron color should be shades-of-white-60 per figma in the thread ancestor settings on the chat screen. {F17402} {F17404} https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/?node-id=1170%3A77104 Test Plan: double check figma that this is correct Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3327
129,184
07.03.2022 16:20:34
18,000
f50a6c62783837bbad1a082cf6c7cde49bb5e859
[web] Fix unread thread title styling in `ChatThreadListItem` Summary: Title is correct color when unread: Test Plan: NA Reviewers: def-au1t, palys-swm, varun, benschac Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.css", "new_path": "web/chat/chat-thread-list.css", "diff": "@@ -27,7 +27,7 @@ div.activeThread,\ndiv.thread:hover {\nbackground: var(--selected-thread-bg);\n}\n-div.thread div.title {\n+div.title {\nflex: 1;\nfont-size: var(--m-font-16);\nfont-weight: var(--semi-bold);\n@@ -94,9 +94,6 @@ div.threadRow > .lastMessage {\ncolor: var(--thread-last-message-color-read);\nfont-size: var(--s-font-14);\n}\n-div.thread.activeThread a {\n- color: red;\n-}\ndiv.unread {\ncolor: var(--fg);\nfont-weight: var(--semi-bold);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Fix unread thread title styling in `ChatThreadListItem` Summary: Title is correct color when unread: https://blob.sh/atul/664a.png Test Plan: NA Reviewers: def-au1t, palys-swm, varun, benschac Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3359
129,184
07.03.2022 19:54:21
18,000
ed3e53aa1251c9d31d8d2d11cc4a997b4ce4fbe7
[web] Fix unread sidebar title styling in `SidebarItem` Summary: Looks as expected: Test Plan: NA Reviewers: def-au1t, palys-swm, varun, benschac Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.css", "new_path": "web/chat/chat-thread-list.css", "diff": "@@ -132,6 +132,9 @@ div.sidebarTitle {\ncolor: var(--thread-color-read);\nalign-self: flex-start;\n}\n+div.sidebarTitle.unread {\n+ color: var(--fg);\n+}\ndiv.sidebarLastActivity {\nwhite-space: nowrap;\nfont-size: var(--xxs-font-10);\n" }, { "change_type": "MODIFY", "old_path": "web/chat/sidebar-item.react.js", "new_path": "web/chat/sidebar-item.react.js", "diff": "@@ -22,7 +22,7 @@ function SidebarItem(props: Props): React.Node {\nreturn (\n<>\n<SWMansionIcon icon=\"right-angle-arrow\" size={28} />\n- <div className={css.spacer}></div>\n+ <div className={css.spacer} />\n<a className={css.threadButtonSidebar} onClick={onClick}>\n<div className={css.threadRow}>\n<div className={unreadCls}>{threadInfo.uiName}</div>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Fix unread sidebar title styling in `SidebarItem` Summary: Looks as expected: Test Plan: NA Reviewers: def-au1t, palys-swm, varun, benschac Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3360
129,184
28.02.2022 18:07:25
18,000
94b1328fcf9ab2f735bd73a810d374cb30c4ebe4
[web] Properly style `messageActionButtonsContainer` Summary: Before: After: Test Plan: NA Reviewers: palys-swm, def-au1t, benschac, varun Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.css", "new_path": "web/chat/message-action-buttons.css", "diff": "-div.messageActionButton {\n+div.messageActionButtonsContainer {\n+ display: flex;\n+ flex-direction: row;\nfont-size: 16px;\n}\ndiv.messageActionLinkIcon {\n- padding: 2px 3px;\n+ margin: 0 3px;\nposition: relative;\n}\ndiv.messageActionExtraAreaTop:before {\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.js", "new_path": "web/chat/message-action-buttons.js", "diff": "@@ -173,7 +173,7 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\n}\nreturn (\n- <div className={css.messageActionButton}>\n+ <div className={css.messageActionButtonsContainer}>\n{sidebarButton}\n{replyButton}\n</div>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Properly style `messageActionButtonsContainer` Summary: Before: https://blob.sh/atul/b611.png After: https://blob.sh/atul/1349.png Test Plan: NA Reviewers: palys-swm, def-au1t, benschac, varun Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3307
129,184
28.02.2022 18:30:19
18,000
3ecb605a9b54b3cf733918dfc3a4ad78449c8d6f
[web] Conditionally lay out `MessageActionButtons` based on `isViewer` Summary: Match existing layout (reply button closer to message)... fixes issue knowingly "introduced" in D3306 Test Plan: `!isViewer`: `isViewer`: Reviewers: varun, benschac, palys-swm, def-au1t, ashoat Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.css", "new_path": "web/chat/message-action-buttons.css", "diff": "-div.messageActionButtonsContainer {\n+div.messageActionButtons {\ndisplay: flex;\n- flex-direction: row;\nfont-size: 16px;\n}\n+div.messageActionButtonsViewer {\n+ flex-direction: row;\n+}\n+div.messageActionButtonsNonViewer {\n+ flex-direction: row-reverse;\n+}\ndiv.messageActionLinkIcon {\nmargin: 0 3px;\nposition: relative;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.js", "new_path": "web/chat/message-action-buttons.js", "diff": "@@ -172,8 +172,14 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\n);\n}\n+ const { isViewer } = messageInfo.creator;\n+ const messageActionButtonsContainer = classNames({\n+ [css.messageActionButtons]: true,\n+ [css.messageActionButtonsViewer]: isViewer,\n+ [css.messageActionButtonsNonViewer]: !isViewer,\n+ });\nreturn (\n- <div className={css.messageActionButtonsContainer}>\n+ <div className={messageActionButtonsContainer}>\n{sidebarButton}\n{replyButton}\n</div>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Conditionally lay out `MessageActionButtons` based on `isViewer` Summary: Match existing layout (reply button closer to message)... fixes issue knowingly "introduced" in D3306 Test Plan: `!isViewer`: https://blob.sh/atul/400a.png `isViewer`: https://blob.sh/atul/7c56.png Reviewers: varun, benschac, palys-swm, def-au1t, ashoat Reviewed By: palys-swm, ashoat Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3309
129,184
08.03.2022 00:50:31
18,000
7b28a9deafcf8e72770e4a1435231a288e475c60
[landing] Re-introduce hover styling for `Footer` links Summary: Bring back the hover styling from before. Here's how it looks: {F18522} Test Plan: NA, looks as expected Reviewers: def-au1t, palys-swm, varun, benschac, ashoat Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "landing/footer.css", "new_path": "landing/footer.css", "diff": "@@ -54,7 +54,19 @@ footer.wrapper {\nvar(--largest-font-size)\n);\nfont-weight: 400;\n- color: #cccccc;\n+}\n+.navigation a,\n+.navigation svg {\n+ color: #808080;\n+ transition: 150ms;\n+ transition-property: color;\n+}\n+\n+.navigation a:hover,\n+.navigation a:hover svg {\n+ color: #ffffff;\n+ transition: 150ms;\n+ transition-property: color;\n}\na.logo {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Re-introduce hover styling for `Footer` links Summary: Bring back the hover styling from before. Here's how it looks: {F18522} Test Plan: NA, looks as expected Reviewers: def-au1t, palys-swm, varun, benschac, ashoat Reviewed By: palys-swm, ashoat Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3366
129,184
28.02.2022 18:52:59
18,000
93d079ef9a8ce3257f96f8fe91b5df8c932c335b
[web] Remove extraneous `sidebarExistsOrCanBeCreated` prop in `MessageActionButtons` Summary: Can use `useSidebarExistsOrCanBeCreated` hook directly instead of "drilling" it in. Test Plan: Close reading, things seem to continue working as expected Reviewers: def-au1t, palys-swm, varun, benschac Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/composed-message.react.js", "new_path": "web/chat/composed-message.react.js", "diff": "@@ -140,7 +140,6 @@ class ComposedMessage extends React.PureComponent<Props> {\nmouseOverMessagePosition={this.props.mouseOverMessagePosition}\ncanReply={this.props.canReply}\ninputState={this.props.inputState}\n- sidebarExistsOrCanBeCreated={this.props.sidebarExistsOrCanBeCreated}\n/>\n);\n}\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.js", "new_path": "web/chat/message-action-buttons.js", "diff": "@@ -5,6 +5,7 @@ import invariant from 'invariant';\nimport * as React from 'react';\nimport type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors';\n+import { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';\nimport type { ThreadInfo } from 'lib/types/thread-types';\nimport type { InputState } from '../input/input-state.js';\n@@ -44,7 +45,6 @@ type MessageActionButtonsProps = {\n+mouseOverMessagePosition?: OnMessagePositionWithContainerInfo,\n+canReply?: boolean,\n+inputState?: ?InputState,\n- +sidebarExistsOrCanBeCreated?: boolean,\n};\nfunction MessageActionButtons(props: MessageActionButtonsProps): React.Node {\nconst {\n@@ -56,7 +56,6 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\nmouseOverMessagePosition,\ncanReply,\ninputState,\n- sidebarExistsOrCanBeCreated,\n} = props;\nconst [tooltipVisible, setTooltipVisible] = React.useState(false);\n@@ -157,6 +156,11 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\n);\n}\n+ const sidebarExistsOrCanBeCreated = useSidebarExistsOrCanBeCreated(\n+ threadInfo,\n+ item,\n+ );\n+\nlet sidebarButton;\nif (sidebarExistsOrCanBeCreated) {\nsidebarButton = (\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Remove extraneous `sidebarExistsOrCanBeCreated` prop in `MessageActionButtons` Summary: Can use `useSidebarExistsOrCanBeCreated` hook directly instead of "drilling" it in. Test Plan: Close reading, things seem to continue working as expected Reviewers: def-au1t, palys-swm, varun, benschac Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3310
129,184
28.02.2022 21:26:14
18,000
3f7eaeea385d080153fcae9c2654c1a413fbc5de
[web] Remove extraneous `containerPosition` prop from `MessageActionButtons` Summary: We can get `containerPosition` from `mouseOverMessagePosition` instead of passing it in directly as a prop Test Plan: NA, flow Reviewers: def-au1t, palys-swm, varun, benschac Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/composed-message.react.js", "new_path": "web/chat/composed-message.react.js", "diff": "@@ -132,9 +132,6 @@ class ComposedMessage extends React.PureComponent<Props> {\n<MessageActionButtons\nthreadInfo={threadInfo}\nitem={item}\n- containerPosition={\n- this.props.mouseOverMessagePosition.containerPosition\n- }\navailableTooltipPositions={availableTooltipPositions}\nsetMouseOverMessagePosition={this.props.setMouseOverMessagePosition}\nmouseOverMessagePosition={this.props.mouseOverMessagePosition}\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.js", "new_path": "web/chat/message-action-buttons.js", "diff": "@@ -20,7 +20,6 @@ import type {\nItemAndContainerPositionInfo,\nMessagePositionInfo,\nOnMessagePositionWithContainerInfo,\n- PositionInfo,\n} from './position-types';\nimport { tooltipPositions, type TooltipPosition } from './tooltip-utils';\nimport {\n@@ -37,12 +36,11 @@ const createSidebarText = 'Create sidebar';\ntype MessageActionButtonsProps = {\n+threadInfo: ThreadInfo,\n+item: ChatMessageInfoItem,\n- +containerPosition: PositionInfo,\n+availableTooltipPositions: $ReadOnlyArray<TooltipPosition>,\n+setMouseOverMessagePosition?: (\nmessagePositionInfo: MessagePositionInfo,\n) => void,\n- +mouseOverMessagePosition?: OnMessagePositionWithContainerInfo,\n+ +mouseOverMessagePosition: OnMessagePositionWithContainerInfo,\n+canReply?: boolean,\n+inputState?: ?InputState,\n};\n@@ -50,7 +48,6 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\nconst {\nthreadInfo,\nitem,\n- containerPosition,\navailableTooltipPositions,\nsetMouseOverMessagePosition,\nmouseOverMessagePosition,\n@@ -58,6 +55,8 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\ninputState,\n} = props;\n+ const { containerPosition } = mouseOverMessagePosition;\n+\nconst [tooltipVisible, setTooltipVisible] = React.useState(false);\nconst [pointingTo, setPointingTo] = React.useState();\n" }, { "change_type": "MODIFY", "old_path": "web/chat/robotext-message.react.js", "new_path": "web/chat/robotext-message.react.js", "diff": "@@ -69,9 +69,7 @@ class RobotextMessage extends React.PureComponent<Props> {\n<MessageActionButtons\nthreadInfo={threadInfo}\nitem={item}\n- containerPosition={\n- this.props.mouseOverMessagePosition.containerPosition\n- }\n+ mouseOverMessagePosition={this.props.mouseOverMessagePosition}\navailableTooltipPositions={availableTooltipPositionsForRobotext}\n/>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Remove extraneous `containerPosition` prop from `MessageActionButtons` Summary: We can get `containerPosition` from `mouseOverMessagePosition` instead of passing it in directly as a prop Test Plan: NA, flow Reviewers: def-au1t, palys-swm, varun, benschac Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3311
129,184
07.03.2022 20:25:07
18,000
c94bd22e82868e749619008485ed7715ef2eaf13
[web] Fix sidebar hover styling in `ChatThreadListSidebar` Summary: Sidebars in the thread list were not being highlighted on hover.. figured they should be. Test Plan: Before: {F18847} After: {F18848} Reviewers: palys-swm, def-au1t, benschac, varun Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.css", "new_path": "web/chat/chat-thread-list.css", "diff": "@@ -24,7 +24,8 @@ div.thread:first-child {\npadding-top: 6px;\n}\ndiv.activeThread,\n-div.thread:hover {\n+div.thread:hover,\n+div.threadListSideBar:hover {\nbackground: var(--selected-thread-bg);\n}\ndiv.title {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Fix sidebar hover styling in `ChatThreadListSidebar` Summary: Sidebars in the thread list were not being highlighted on hover.. figured they should be. Test Plan: Before: {F18847} After: {F18848} Reviewers: palys-swm, def-au1t, benschac, varun Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3361
129,191
25.02.2022 16:39:15
-3,600
18dec803fe3afefa1ef764572da700acb1b101d2
[web] Add logged in section Summary: Display a label and username {F17278} {F17327} Depends on D3320 Test Plan: Render the page instead of Calendar and check if it matches the design and if current username was displayed Reviewers: benschac, atul, def-au1t Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/settings/account-settings.css", "new_path": "web/settings/account-settings.css", "diff": "color: var(--fg);\nfont-weight: var(--semi-bold);\nline-height: var(--line-height-display);\n+ padding-bottom: 55px;\n+}\n+\n+.content ul {\n+ list-style-type: none;\n+}\n+\n+.content li {\n+ color: var(--account-settings-label);\n+ border-bottom: 1px solid var(--border-color);\n+ padding: 24px 16px 16px;\n+}\n+\n+.logoutContainer {\n+ white-space: nowrap;\n+ overflow: hidden;\n+ text-overflow: ellipsis;\n+ color: var(--fg);\n+}\n+\n+.logoutLabel {\n+ color: var(--account-settings-label);\n+}\n+\n+.username {\n+ color: var(--fg);\n}\n" }, { "change_type": "MODIFY", "old_path": "web/settings/account-settings.react.js", "new_path": "web/settings/account-settings.react.js", "diff": "import * as React from 'react';\n+import { useSelector } from '../redux/redux-utils';\nimport css from './account-settings.css';\nfunction AccountSettings(): React.Node {\n+ const currentUserInfo = useSelector(state => state.currentUserInfo);\n+ if (!currentUserInfo || currentUserInfo.anonymous) {\n+ return null;\n+ }\n+ const { username } = currentUserInfo;\n+\nreturn (\n<div className={css.container}>\n<h4 className={css.header}>My Account</h4>\n+ <div className={css.content}>\n+ <ul>\n+ <li>\n+ <p className={css.logoutContainer}>\n+ <span className={css.logoutLabel}>{'Logged in as '}</span>\n+ <span className={css.username}>{username}</span>\n+ </p>\n+ </li>\n+ </ul>\n+ </div>\n</div>\n);\n}\n" }, { "change_type": "MODIFY", "old_path": "web/theme.css", "new_path": "web/theme.css", "diff": "--app-list-icon-read-only-color: var(--shades-black-60);\n--app-list-icon-enabled-color: var(--success-primary);\n--app-list-icon-disabled-color: var(--shades-white-80);\n+ --account-settings-label: var(--shades-black-60);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Add logged in section Summary: Display a label and username https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/Comm-%2F-Desktop-app?node-id=1272%3A88750 {F17278} {F17327} Depends on D3320 Test Plan: Render the page instead of Calendar and check if it matches the design and if current username was displayed Reviewers: benschac, atul, def-au1t Reviewed By: benschac, atul Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3321
129,185
09.03.2022 16:18:44
-3,600
871eb88878fe81683c1a16b466cd2b76cbfa72e8
[web] Show sidebars modal from thread menu Summary: Add action on Sidebars item in thread menu. It displays modal with sidebars. Test Plan: Select thread with sidebars inside and select "Sidebars" from thread menu Reviewers: palys-swm, benschac, atul, ashoat Subscribers: ashoat, Adrian, atul, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/thread-menu.react.js", "new_path": "web/chat/thread-menu.react.js", "diff": "@@ -23,6 +23,7 @@ import {\nthreadPermissions,\n} from 'lib/types/thread-types';\n+import SidebarListModal from '../modals/chat/sidebar-list-modal.react';\nimport { useModalContext } from '../modals/modal-provider.react';\nimport ThreadSettingsModal from '../modals/threads/thread-settings-modal.react';\nimport { useSelector } from '../redux/redux-utils';\n@@ -74,14 +75,24 @@ function ThreadMenu(props: ThreadMenuProps): React.Node {\n);\n}, [childThreads]);\n+ const onClickSidebars = React.useCallback(\n+ () => setModal(<SidebarListModal threadInfo={threadInfo} />),\n+ [setModal, threadInfo],\n+ );\n+\nconst sidebarItem = React.useMemo(() => {\nif (!hasSidebars) {\nreturn null;\n}\nreturn (\n- <ThreadMenuItem key=\"sidebars\" text=\"Sidebars\" icon={faArrowRight} />\n+ <ThreadMenuItem\n+ key=\"sidebars\"\n+ text=\"Sidebars\"\n+ icon={faArrowRight}\n+ onClick={onClickSidebars}\n+ />\n);\n- }, [hasSidebars]);\n+ }, [hasSidebars, onClickSidebars]);\nconst canCreateSubchannels = React.useMemo(\n() => threadHasPermission(threadInfo, threadPermissions.CREATE_SUBCHANNELS),\n@@ -145,7 +156,6 @@ function ThreadMenu(props: ThreadMenuProps): React.Node {\n// TODO: Enable menu items when the modals are implemented\nconst SHOW_NOTIFICATIONS = false;\nconst SHOW_MEMBERS = false;\n- const SHOW_SIDEBAR = false;\nconst SHOW_VIEW_SUBCHANNELS = false;\nconst SHOW_CREATE_SUBCHANNELS = false;\nconst SHOW_LEAVE_THREAD = false;\n@@ -154,7 +164,7 @@ function ThreadMenu(props: ThreadMenuProps): React.Node {\nsettingsItem,\nSHOW_NOTIFICATIONS && notificationsItem,\nSHOW_MEMBERS && membersItem,\n- SHOW_SIDEBAR && sidebarItem,\n+ sidebarItem,\nSHOW_VIEW_SUBCHANNELS && viewSubchannelsItem,\nSHOW_CREATE_SUBCHANNELS && createSubchannelsItem,\nSHOW_LEAVE_THREAD && leaveThreadItem && separator,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Show sidebars modal from thread menu Summary: Add action on Sidebars item in thread menu. It displays modal with sidebars. Test Plan: Select thread with sidebars inside and select "Sidebars" from thread menu Reviewers: palys-swm, benschac, atul, ashoat Reviewed By: palys-swm, ashoat Subscribers: ashoat, Adrian, atul, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3333
129,191
03.03.2022 18:18:08
-3,600
adc557bce79874b5da7e03eeea3f5488bb891ea2
[web] Export navigation tab types Summary: These will be used in a couple of places Depends on D3339 Depends on D3336 Test Plan: Just check if opening chat and calendar still works Reviewers: benschac, atul, def-au1t Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/types/nav-types.js", "new_path": "web/types/nav-types.js", "diff": "import type { BaseNavInfo } from 'lib/types/nav-types';\nimport type { ThreadInfo } from 'lib/types/thread-types';\n+export type NavigationTab = 'calendar' | 'chat' | 'apps' | 'settings';\n+\nexport type NavInfo = {\n...$Exact<BaseNavInfo>,\n- +tab: 'calendar' | 'chat' | 'apps' | 'settings',\n+ +tab: NavigationTab,\n+activeChatThreadID: ?string,\n+pendingThread?: ThreadInfo,\n+settingsSection?: 'account',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Export navigation tab types Summary: These will be used in a couple of places Depends on D3339 Depends on D3336 Test Plan: Just check if opening chat and calendar still works Reviewers: benschac, atul, def-au1t Reviewed By: benschac, atul Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3340
129,184
07.03.2022 14:24:47
18,000
816c1f56fa3c9b0310e1215b49f6b9a41132b8d6
[web] Change `messageActionButtons svg` color on hover Summary: Here's what it looks like: {F18372} Test Plan: Looks as expected Reviewers: def-au1t, palys-swm, benschac, varun Subscribers: Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.css", "new_path": "web/chat/message-action-buttons.css", "diff": "@@ -2,6 +2,12 @@ div.messageActionButtons {\ndisplay: flex;\nfont-size: 16px;\n}\n+div.messageActionButtons svg {\n+ color: var(--color-disabled);\n+}\n+div.messageActionButtons svg:hover {\n+ color: var(--fg);\n+}\ndiv.messageActionButtonsViewer {\nflex-direction: row;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Change `messageActionButtons svg` color on hover Summary: Here's what it looks like: {F18372} Test Plan: Looks as expected Reviewers: def-au1t, palys-swm, benschac, varun Reviewed By: palys-swm, benschac Subscribers: Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3357
129,184
09.03.2022 12:58:39
18,000
c06b6b718261d7629e0ddd6398f652e68390aba6
[native] `codeVersion` -> 130
[ { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{129};\n+ const int codeVersion{130};\nstd::unique_ptr<WorkerThread> databaseThread;\nstd::unique_ptr<WorkerThread> cryptoThread;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.129</string>\n+ <string>1.0.130</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>129</string>\n+ <string>130</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.129</string>\n+ <string>1.0.130</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>129</string>\n+ <string>130</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 130
129,179
25.02.2022 15:55:11
18,000
f855c95576d153f026c26d3d32414c38f3e1eccf
[web] [fix] updated icons component Summary: fix the "filled" icon, it's now message-filed-round and outline-key to key Test Plan: N/A this will break production because we don't have the new icon json yet. Nothing to test. Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/SWMansionIcon.react.js", "new_path": "web/SWMansionIcon.react.js", "diff": "@@ -17,7 +17,7 @@ export type Icon =\n| 'plus'\n| 'settings'\n| 'wrench'\n- | 'Filled'\n+ | 'message-filled-round'\n| 'bug'\n| 'cloud'\n| 'copy'\n@@ -27,7 +27,7 @@ export type Icon =\n| 'message-circle-line'\n| 'question-circle'\n| 'search'\n- | 'outline-key'\n+ | 'key'\n| 'chevron-left'\n| 'arrow-left'\n| 'arrow-right'\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-tabs.react.js", "new_path": "web/chat/chat-tabs.react.js", "diff": "@@ -39,7 +39,7 @@ function ChatTabs(): React.Node {\ntitle=\"Focus\"\ntabIsActive={activeTab === 'Focus'}\nonClick={onClickHome}\n- icon=\"Filled\"\n+ icon=\"message-filled-round\"\n/>\n<ChatThreadTab\ntitle={backgroundTitle}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] updated icons component Summary: fix the "filled" icon, it's now message-filed-round and outline-key to key Test Plan: N/A this will break production because we don't have the new icon json yet. Nothing to test. Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3294
129,179
28.02.2022 12:37:25
18,000
005ec1e0e28e43834a12a44287c32ebd9eba2183
[web] fix input icons to be the correct size Summary: re-size the icons with padding, before: {F16689} after: {F16690} Test Plan: check figma, make sure the icons are the correct size: Reviewers: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-input-bar.react.js", "new_path": "web/chat/chat-input-bar.react.js", "diff": "@@ -226,7 +226,7 @@ class ChatInputBar extends React.PureComponent<Props> {\nif (this.props.inputState.draft.length) {\nsendButton = (\n<a onClick={this.onSend} className={css.sendButton}>\n- <SWMansionIcon icon=\"send\" size={16} color=\"#8a8a8a\" />\n+ <SWMansionIcon icon=\"send\" size={22} color=\"#8a8a8a\" />\n</a>\n);\n}\n@@ -245,7 +245,7 @@ class ChatInputBar extends React.PureComponent<Props> {\naccept={allowedMimeTypeString}\nmultiple\n/>\n- <SWMansionIcon icon=\"image\" size={16} disableFill />\n+ <SWMansionIcon icon=\"image\" size={22} disableFill />\n</a>\n<div className={css.inputBarTextInput}>\n<textarea\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] fix input icons to be the correct size Summary: re-size the icons with padding, before: {F16689} after: {F16690} Test Plan: check figma, make sure the icons are the correct size: https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/Comm-%2F-Desktop-app?node-id=1170%3A79456 Reviewers: atul Reviewed By: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3300
129,179
02.03.2022 13:25:22
18,000
641c446d3677ab492359f90ddb2a00f63e33d446
[web] [fix] update cloud icon to correct size with paddings Summary: update font size so cloud icon in bread crumb is the correct size {F17394} {F17396} Test Plan: go to figma, check the sizes match: Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-ancestors.react.js", "new_path": "web/chat/chat-thread-ancestors.react.js", "diff": "@@ -51,7 +51,7 @@ function ThreadAncestors(props: ThreadAncestorsProps): React.Node {\n() => (\n<div className={css.ancestorKeyserver}>\n<div className={css.ancestorKeyserverOperator}>\n- <SWMansionIcon icon=\"cloud\" size={10} />\n+ <SWMansionIcon icon=\"cloud\" size={12} />\n<span>{keyserverOwnerUsername}</span>\n</div>\n<div\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] update cloud icon to correct size with paddings Summary: update font size so cloud icon in bread crumb is the correct size {F17394} {F17396} Test Plan: go to figma, check the sizes match: https://www.figma.com/file/a1nkbWgbgjRlrOY9LVurTz/?node-id=1170%3A77104 Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3326
129,184
09.03.2022 13:43:30
18,000
d19789f31d765bcb990b43ff701beb1ef007a05a
[web] Pull `getIconPosition` out of `toggleTooltip` Summary: NA Test Plan: NA Reviewers: def-au1t, palys-swm, varun, benschac Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.js", "new_path": "web/chat/message-action-buttons.js", "diff": "@@ -20,6 +20,7 @@ import type {\nItemAndContainerPositionInfo,\nMessagePositionInfo,\nOnMessagePositionWithContainerInfo,\n+ PositionInfo,\n} from './position-types';\nimport { tooltipPositions, type TooltipPosition } from './tooltip-utils';\nimport {\n@@ -67,25 +68,10 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\nreturn;\n}\nconst rect = event.currentTarget.getBoundingClientRect();\n- const { top, bottom, left, right, width, height } = rect;\n-\n- const iconPosition: ItemAndContainerPositionInfo = {\n+ const iconPosition: ItemAndContainerPositionInfo = getIconPosition(\n+ rect,\ncontainerPosition,\n- itemPosition: {\n- top:\n- top -\n- containerPosition.top +\n- messageActionIconExcessVerticalWhitespace,\n- bottom:\n- bottom -\n- containerPosition.top -\n- messageActionIconExcessVerticalWhitespace,\n- left: left - containerPosition.left,\n- right: right - containerPosition.left,\n- width,\n- height: height - messageActionIconExcessVerticalWhitespace * 2,\n- },\n- };\n+ );\nsetPointingTo(iconPosition);\n},\n[containerPosition, tooltipVisible],\n@@ -189,6 +175,28 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\n);\n}\n+function getIconPosition(\n+ rect: ClientRect,\n+ containerPosition: PositionInfo,\n+): ItemAndContainerPositionInfo {\n+ const { top, bottom, left, right, width, height } = rect;\n+ return {\n+ containerPosition,\n+ itemPosition: {\n+ top:\n+ top - containerPosition.top + messageActionIconExcessVerticalWhitespace,\n+ bottom:\n+ bottom -\n+ containerPosition.top -\n+ messageActionIconExcessVerticalWhitespace,\n+ left: left - containerPosition.left,\n+ right: right - containerPosition.left,\n+ width,\n+ height: height - messageActionIconExcessVerticalWhitespace * 2,\n+ },\n+ };\n+}\n+\nfunction getMessageActionTooltipStyle(\ntooltipPosition: TooltipPosition,\n): TooltipStyle {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Pull `getIconPosition` out of `toggleTooltip` Summary: NA Test Plan: NA Reviewers: def-au1t, palys-swm, varun, benschac Reviewed By: varun Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3356
129,184
09.03.2022 14:38:57
18,000
6d44ac4b235666c9f5e78997d28d9b89805bb6e9
[web] `threadListSideBar` -> `threadListSidebar` Summary: Super minor rename addressing feedback: Test Plan: Searched repo for `threadListSide[B/b]ar` and found no other occurrences Reviewers: palys-swm, def-au1t, varun, benschac, jimpo Subscribers: ashoat, Adrian, karol-bisztyga, palys-swm
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list-sidebar.react.js", "new_path": "web/chat/chat-thread-list-sidebar.react.js", "diff": "@@ -21,7 +21,7 @@ function ChatThreadListSidebar(props: Props): React.Node {\nreturn (\n<div\n- className={classNames(css.threadListSideBar, css.sidebar, {\n+ className={classNames(css.threadListSidebar, css.sidebar, {\n[css.activeThread]: active,\n})}\n>\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.css", "new_path": "web/chat/chat-thread-list.css", "diff": "@@ -6,7 +6,7 @@ div.thread {\npadding-bottom: 4px;\npadding-right: 10px;\n}\n-div.threadListSideBar {\n+div.threadListSidebar {\ndisplay: flex;\nflex-direction: row;\nalign-items: flex-start;\n@@ -15,7 +15,7 @@ div.threadListSideBar {\npadding-right: 10px;\nposition: relative;\n}\n-div.threadListSideBar > svg {\n+div.threadListSidebar > svg {\nposition: absolute;\ntop: -13px;\nleft: 30px;\n@@ -25,7 +25,7 @@ div.thread:first-child {\n}\ndiv.activeThread,\ndiv.thread:hover,\n-div.threadListSideBar:hover {\n+div.threadListSidebar:hover {\nbackground: var(--selected-thread-bg);\n}\ndiv.title {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] `threadListSideBar` -> `threadListSidebar` Summary: Super minor rename addressing @palys-swm feedback: https://phabricator.ashoat.com/D3361?id=10124#inline-19750 Test Plan: Searched repo for `threadListSide[B/b]ar` and found no other occurrences Reviewers: palys-swm, def-au1t, varun, benschac, jimpo Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga, palys-swm Differential Revision: https://phabricator.ashoat.com/D3389
129,184
09.03.2022 20:07:37
18,000
ba52e334ec4fa96283455ae90338d7388219db31
[landing] Reintroduce hover styling for `Header` nav links Summary: Bring back hover styling for `Header` nav links Test Plan: Here's how it looks: {F19519} Reviewers: def-au1t, varun, benschac, palys-swm Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "landing/header.css", "new_path": "landing/header.css", "diff": "@@ -24,10 +24,14 @@ nav.wrapper {\n.tab {\nfont-size: 24px;\n- font-weight: 400;\n- color: var(--unselected);\n+ font-weight: 500;\n+ color: #808080;\nfont-family: 'IBM Plex Sans', sans-serif;\n- transition: 300ms;\n+ transition: 150ms;\n+ transition-property: color;\n+}\n+.tab:hover {\n+ color: #ffffff;\n}\n.page_nav {\n" }, { "change_type": "MODIFY", "old_path": "landing/header.react.js", "new_path": "landing/header.react.js", "diff": "@@ -21,7 +21,6 @@ const navLinkProps = {\nclassName: css.tab,\nactiveStyle: {\ncolor: 'white',\n- fontWeight: '500',\n},\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Reintroduce hover styling for `Header` nav links Summary: Bring back hover styling for `Header` nav links Test Plan: Here's how it looks: {F19519} Reviewers: def-au1t, varun, benschac, palys-swm Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3393
129,191
09.03.2022 18:55:00
-3,600
2f88cd59f456cf69f32a1ebb4b2ba0c1115b8d82
[web] Address remaining code review comments from D3341 Summary: Rename `activeThreadCurrentlyUnread` and delete unused variable Depends on D3341 Depends on D3387 Test Plan: Flow Reviewers: benschac, atul, def-au1t Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/sidebar/app-switcher.react.js", "new_path": "web/sidebar/app-switcher.react.js", "diff": "// @flow\n-import invariant from 'invariant';\nimport * as React from 'react';\nimport { useDispatch } from 'react-redux';\n@@ -20,7 +19,7 @@ function AppSwitcher(): React.Node {\nstate => state.navInfo.activeChatThreadID,\n);\nconst mostRecentlyReadThread = useSelector(mostRecentlyReadThreadSelector);\n- const activeThreadCurrentlyUnread = useSelector(\n+ const isActiveThreadCurrentlyUnread = useSelector(\nstate =>\n!activeChatThreadID ||\n!!state.threadStore.threadInfos[activeChatThreadID]?.currentUser.unread,\n@@ -35,7 +34,7 @@ function AppSwitcher(): React.Node {\ntype: updateNavInfoActionType,\npayload: {\ntab: 'chat',\n- activeChatThreadID: activeThreadCurrentlyUnread\n+ activeChatThreadID: isActiveThreadCurrentlyUnread\n? mostRecentlyReadThread\n: activeChatThreadID,\n},\n@@ -43,19 +42,14 @@ function AppSwitcher(): React.Node {\n},\n[\ndispatch,\n- activeThreadCurrentlyUnread,\n+ isActiveThreadCurrentlyUnread,\nmostRecentlyReadThread,\nactiveChatThreadID,\n],\n);\n- const viewerID = useSelector(\n- state => state.currentUserInfo && state.currentUserInfo.id,\n- );\n-\nconst boundUnreadCount = useSelector(unreadCount);\n- invariant(viewerID, 'should be set');\nlet chatBadge = null;\nif (boundUnreadCount > 0) {\nchatBadge = <span className={css.chatBadge}>{boundUnreadCount}</span>;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Address remaining code review comments from D3341 Summary: Rename `activeThreadCurrentlyUnread` and delete unused variable Depends on D3341 Depends on D3387 Test Plan: Flow Reviewers: benschac, atul, def-au1t Reviewed By: benschac, atul Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3388
129,184
15.03.2022 14:28:59
14,400
e9743411cc8f0cd6ee15e7732a594acde3016aa3
[landing] Fix "fluid" `font-size` for `keyserver.js:h1` Summary: Before these were 24px at smallest breakpoint and 56px at largest breakpoint. Now we linearly interpolate over that range. Test Plan: Here's how it looks: {F22355} Reviewers: palys-swm, benschac, ashoat Subscribers: Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "landing/keyservers.css", "new_path": "landing/keyservers.css", "diff": "@@ -4,14 +4,15 @@ div.body_grid {\nmargin-right: auto;\ndisplay: grid;\ncolumn-gap: 6em;\n- padding-left: 60px;\n- padding-right: 60px;\n- padding-top: 20px;\n- padding-bottom: 40px;\n+ padding: 20px 60px 40px;\ntransition-property: max-width;\ntransition: 300ms;\n}\n+div.body_grid h1 {\n+ font-size: clamp(1.5rem, 1.0817rem + 2.0915vw, 3.5rem);\n+}\n+\n.mono {\nfont-family: 'iA Writer Duo S', monospace;\npadding-bottom: 24px;\n@@ -90,12 +91,9 @@ div.body_grid > div + .starting_section {\n/* ===== COMMON CSS GRID LAYOUT ===== */\ndiv.body_grid,\ndiv.app_landing_grid {\n- padding-left: 3%;\n- padding-right: 3%;\ngrid-template-columns: minmax(auto, 540px);\njustify-content: center;\n- padding-top: 0vh;\n- padding-bottom: 2vh;\n+ padding: 0 3% 2vh;\n}\n/* ===== CSS BODY GRID LAYOUT ===== */\n@@ -114,9 +112,6 @@ div.body_grid > div + .starting_section {\ntext-align: left;\npadding-top: 60px;\n}\n- .keyserver_company > h1 {\n- font-size: 24px;\n- }\ndiv.keyserver_copy {\npadding-bottom: 0;\n}\n" }, { "change_type": "MODIFY", "old_path": "landing/keyservers.react.js", "new_path": "landing/keyservers.react.js", "diff": "@@ -105,7 +105,7 @@ function Keyservers(): React.Node {\n/>\n</div>\n<div className={`${css.server_copy} ${css.section}`}>\n- <h2 className={css.mono}>Apps need servers.</h2>\n+ <h1 className={css.mono}>Apps need servers.</h1>\n<p>\nSophisticated applications rely on servers to do things that your\ndevices simply can&apos;t.\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Fix "fluid" `font-size` for `keyserver.js:h1` Summary: Before these were 24px at smallest breakpoint and 56px at largest breakpoint. Now we linearly interpolate over that range. Test Plan: Here's how it looks: {F22355} Reviewers: palys-swm, benschac, ashoat Reviewed By: ashoat Subscribers: Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3434
129,184
15.03.2022 15:32:47
14,400
1349fa4902f811ea699ee41e7995457f3460d9b2
[landing] Fix "fluid" `font-size` for `hero-content:sub_heading` Summary: Continues to look as expected. Maintains proportion with the cycling header now which seems like it's actually a slight improvement. Test Plan: Here's how it looks: {F22395} Reviewers: benschac, palys-swm, ashoat Subscribers: Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "landing/hero-content.css", "new_path": "landing/hero-content.css", "diff": ".sub_heading {\ncolor: var(--sub-heading-color);\n- --smallest-font-size: 16px;\n- --largest-font-size: 50px;\n- --font-scale: calc(0.75rem + 1.25vw);\n-\n- font-size: clamp(\n- var(--smallest-font-size),\n- var(--font-scale),\n- var(--largest-font-size)\n- );\n+ font-size: clamp(1rem, 0.5556rem + 2.2222vw, 3.125rem);\nmargin-bottom: 60px;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Fix "fluid" `font-size` for `hero-content:sub_heading` Summary: Continues to look as expected. Maintains proportion with the cycling header now which seems like it's actually a slight improvement. Test Plan: Here's how it looks: {F22395} Reviewers: benschac, palys-swm, ashoat Reviewed By: ashoat Subscribers: Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3435
129,184
15.03.2022 15:53:24
14,400
a97182d344c3db9f9c4871cce9cc6aec3a748a8b
[landing] Fix "fluid" `font-size` for `footer:navigation a` Summary: Interpolate from 16px to 24px for width of 320px to 1850px. Test Plan: Continues to look as expected: {F22428} (towards end) Reviewers: def-au1t, palys-swm, benschac Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "landing/footer.css", "new_path": "landing/footer.css", "diff": "@@ -44,15 +44,7 @@ footer.wrapper {\n}\n.navigation a {\n- --smallest-font-size: 16px;\n- --largest-font-size: 24px;\n- --scale: calc(0.75rem + 2vw);\n-\n- font-size: clamp(\n- var(--smallest-font-size),\n- var(--scale),\n- var(--largest-font-size)\n- );\n+ font-size: clamp(1rem, 0.8954rem + 0.5229vw, 1.5rem);\nfont-weight: 400;\n}\n.navigation a,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Fix "fluid" `font-size` for `footer:navigation a` Summary: Interpolate from 16px to 24px for width of 320px to 1850px. Test Plan: Continues to look as expected: {F22428} (towards end) Reviewers: def-au1t, palys-swm, benschac Reviewed By: palys-swm, benschac Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3436
129,184
15.03.2022 16:04:00
14,400
e266efa148f69aab345b705719681251f63c9fd1
[landing] Fix "fluid" `font-size`/`padding-bottom` for `info-block:title` Summary: Interpolate over values from width of 320px to 1850px Test Plan: Continues to look as expected: {F22464} Reviewers: benschac, palys-swm, ashoat Subscribers: Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "landing/info-block.css", "new_path": "landing/info-block.css", "diff": "}\n.title {\n- --smallest-font-size: 30px;\n- --largest-font-size: 50px;\n- --smallest-padding-size: 16px;\n- --largest-padding-size: 48px;\n- --scale: calc(0.75rem + 2vw);\n-\nfont-family: 'iA Writer Duo S', monospace;\nfont-style: normal;\n- line-height: 1.35;\n- letter-spacing: -0.01em;\n-\n- padding-bottom: clamp(\n- var(--smallest-padding-size),\n- var(--scale),\n- var(--largest-padding-size)\n- );\ntext-align: left;\n-\n- font-size: clamp(\n- var(--smallest-font-size),\n- var(--scale),\n- var(--largest-font-size)\n- );\n+ line-height: 1.35;\n+ padding-bottom: clamp(1rem, 0.5817rem + 2.0915vw, 3rem);\n+ font-size: clamp(1.875rem, 1.6136rem + 1.3072vw, 3.125rem);\n}\n.description {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Fix "fluid" `font-size`/`padding-bottom` for `info-block:title` Summary: Interpolate over values from width of 320px to 1850px Test Plan: Continues to look as expected: {F22464} Reviewers: benschac, palys-swm, ashoat Reviewed By: ashoat Subscribers: Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3437
129,184
16.03.2022 18:06:38
14,400
85f151280180750e957603125660a4af194b681d
[web] Remove `div.bottomContainer` from `Splash` Summary: Cut `div.bottomContainer` in `splash.react.js` and associated styles in `splash.css`. Here's how it looks: {F23236} depends on D3447 Test Plan: Same as D3447 (tldr: make sure we can still log in, etc) Reviewers: def-au1t, palys-swm, benschac, varun Subscribers: Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/splash/splash.css", "new_path": "web/splash/splash.css", "diff": "@@ -59,45 +59,3 @@ p.introDescription {\nfont-weight: 300;\npadding-top: 5px;\n}\n-div.bottomContainer {\n- z-index: 2;\n- position: relative;\n- overflow: auto;\n- height: 100%;\n-}\n-div.bottom {\n- margin-top: 728px;\n- min-height: 100%;\n- display: flex;\n- flex-direction: column;\n-}\n-div.headerRest {\n- background-color: rgba(255, 255, 255, 0.84);\n- flex-grow: 1;\n-}\n-div.headerOverscroll {\n- position: fixed;\n- top: 100%;\n- left: 0;\n- right: 0;\n- height: 1000px;\n- background-color: white;\n-}\n-div.prompt {\n- margin: 0 auto;\n- display: flex;\n- flex-direction: column;\n- align-items: center;\n-}\n-p.promptHeader {\n- color: #282828;\n- font-size: 21px;\n- padding-top: 25px;\n- text-align: center;\n-}\n-p.promptDescription {\n- color: #282828;\n- font-size: 18px;\n- padding-top: 9px;\n- text-align: center;\n-}\n" }, { "change_type": "MODIFY", "old_path": "web/splash/splash.react.js", "new_path": "web/splash/splash.react.js", "diff": "@@ -43,22 +43,6 @@ class Splash extends React.PureComponent<Props> {\n</div>\n</div>\n</div>\n- <div className={css.bottomContainer}>\n- <div className={css.bottom}>\n- <div className={css.headerRest}>\n- <div className={css.prompt}>\n- <p className={css.promptHeader}>\n- We&apos;re currently alpha testing the first version of our\n- app.\n- </p>\n- <p className={css.promptDescription}>\n- If you&apos;d like to try it out, please let us know!\n- </p>\n- </div>\n- </div>\n- <div className={css.headerOverscroll} />\n- </div>\n- </div>\n</div>\n{this.props.modal}\n</React.Fragment>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Remove `div.bottomContainer` from `Splash` Summary: Cut `div.bottomContainer` in `splash.react.js` and associated styles in `splash.css`. Here's how it looks: {F23236} --- depends on D3447 Test Plan: Same as D3447 (tldr: make sure we can still log in, etc) Reviewers: def-au1t, palys-swm, benschac, varun Reviewed By: palys-swm, benschac Subscribers: Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3448
129,200
11.03.2022 15:43:21
18,000
1e857b8e6fb50517a65340bea990d96f66054853
choose which app url facts to use based on request url Summary: use getAppURLFactsFromRequestURL to choose which app URL facts to use. depends on D3406 Test Plan: flow Reviewers: palys-swm, atul, ashoat Subscribers: ashoat, Adrian, karol-bisztyga, benschac
[ { "change_type": "MODIFY", "old_path": "server/src/responders/handlers.js", "new_path": "server/src/responders/handlers.js", "diff": "@@ -13,6 +13,7 @@ import {\ncreateNewAnonymousCookie,\n} from '../session/cookies';\nimport type { Viewer } from '../session/viewer';\n+import { type AppURLFacts, getAppURLFactsFromRequestURL } from '../utils/urls';\nimport { getMessageForException } from './utils';\nexport type JSONResponder = (viewer: Viewer, input: any) => Promise<*>;\n@@ -41,10 +42,22 @@ function jsonHandler(\nreturn;\n}\nconst result = { ...responderResult };\n- addCookieToJSONResponse(viewer, res, result, expectCookieInvalidation);\n+ addCookieToJSONResponse(\n+ viewer,\n+ res,\n+ result,\n+ expectCookieInvalidation,\n+ getAppURLFactsFromRequestURL(req.url),\n+ );\nres.json({ success: true, ...result });\n} catch (e) {\n- await handleException(e, res, viewer, expectCookieInvalidation);\n+ await handleException(\n+ e,\n+ res,\n+ getAppURLFactsFromRequestURL(req.url),\n+ viewer,\n+ expectCookieInvalidation,\n+ );\n}\n};\n}\n@@ -58,7 +71,12 @@ function httpGetHandler(\nviewer = await fetchViewerForJSONRequest(req);\nawait responder(viewer, req, res);\n} catch (e) {\n- await handleException(e, res, viewer);\n+ await handleException(\n+ e,\n+ res,\n+ getAppURLFactsFromRequestURL(req.url),\n+ viewer,\n+ );\n}\n};\n}\n@@ -73,7 +91,7 @@ function downloadHandler(\n} catch (e) {\n// Passing viewer in only makes sense if we want to handle failures as\n// JSON. We don't, and presume all download handlers avoid ServerError.\n- await handleException(e, res);\n+ await handleException(e, res, getAppURLFactsFromRequestURL(req.url));\n}\n};\n}\n@@ -81,6 +99,7 @@ function downloadHandler(\nasync function handleException(\nerror: Error,\nres: $Response,\n+ appURLFacts: AppURLFacts,\nviewer?: ?Viewer,\nexpectCookieInvalidation?: boolean,\n) {\n@@ -110,7 +129,13 @@ async function handleException(\nviewer.cookieInvalidated = true;\n}\n// This can mutate the result object\n- addCookieToJSONResponse(viewer, res, result, !!expectCookieInvalidation);\n+ addCookieToJSONResponse(\n+ viewer,\n+ res,\n+ result,\n+ !!expectCookieInvalidation,\n+ appURLFacts,\n+ );\n}\nres.json(result);\n}\n@@ -121,7 +146,11 @@ function htmlHandler(\nreturn async (req: $Request, res: $Response) => {\ntry {\nconst viewer = await fetchViewerForHomeRequest(req);\n- addCookieToHomeResponse(viewer, res);\n+ addCookieToHomeResponse(\n+ viewer,\n+ res,\n+ getAppURLFactsFromRequestURL(req.url),\n+ );\nres.type('html');\nawait responder(viewer, req, res);\n} catch (e) {\n@@ -165,10 +194,21 @@ function uploadHandler(\nreturn;\n}\nconst result = { ...responderResult };\n- addCookieToJSONResponse(viewer, res, result, false);\n+ addCookieToJSONResponse(\n+ viewer,\n+ res,\n+ result,\n+ false,\n+ getAppURLFactsFromRequestURL(req.url),\n+ );\nres.json({ success: true, ...result });\n} catch (e) {\n- await handleException(e, res, viewer);\n+ await handleException(\n+ e,\n+ res,\n+ getAppURLFactsFromRequestURL(req.url),\n+ viewer,\n+ );\n}\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "server/src/responders/website-responders.js", "new_path": "server/src/responders/website-responders.js", "diff": "@@ -41,14 +41,10 @@ import {\nimport { setNewSession } from '../session/cookies';\nimport { Viewer } from '../session/viewer';\nimport { streamJSON, waitForStream } from '../utils/json-stream';\n-import { getSquadCalURLFacts } from '../utils/urls';\n+import { getAppURLFactsFromRequestURL } from '../utils/urls';\n-const { basePath, baseDomain } = getSquadCalURLFacts();\nconst { renderToNodeStream } = ReactDOMServer;\n-const baseURL = basePath.replace(/\\/$/, '');\n-const baseHref = baseDomain + baseURL;\n-\nconst access = promisify(fs.access);\nconst googleFontsURL =\n'https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Inter:wght@400;500;600&display=swap';\n@@ -116,6 +112,10 @@ async function websiteResponder(\nreq: $Request,\nres: $Response,\n): Promise<void> {\n+ const { basePath, baseDomain } = getAppURLFactsFromRequestURL(req.url);\n+ const baseURL = basePath.replace(/\\/$/, '');\n+ const baseHref = baseDomain + baseURL;\n+\nconst appPromise = getWebpackCompiledRootComponentForSSR();\nlet initialNavInfo;\n" }, { "change_type": "MODIFY", "old_path": "server/src/session/cookies.js", "new_path": "server/src/session/cookies.js", "diff": "@@ -32,12 +32,10 @@ import { handleAsyncPromise } from '../responders/handlers';\nimport { clearDeviceToken } from '../updaters/device-token-updaters';\nimport { updateThreadMembers } from '../updaters/thread-updaters';\nimport { assertSecureRequest } from '../utils/security-utils';\n-import { getSquadCalURLFacts } from '../utils/urls';\n+import { type AppURLFacts } from '../utils/urls';\nimport { Viewer } from './viewer';\nimport type { AnonymousViewerData, UserViewerData } from './viewer';\n-const { baseDomain, basePath, https } = getSquadCalURLFacts();\n-\nfunction cookieIsExpired(lastUsed: number) {\nreturn lastUsed + cookieLifetime <= Date.now();\n}\n@@ -534,11 +532,11 @@ function createViewerForInvalidFetchViewerResult(\nreturn viewer;\n}\n-const domainAsURL = new url.URL(baseDomain);\nfunction addSessionChangeInfoToResult(\nviewer: Viewer,\nres: $Response,\nresult: Object,\n+ appURLFacts: AppURLFacts,\n) {\nlet threadInfos = {},\nuserInfos = {};\n@@ -566,7 +564,7 @@ function addSessionChangeInfoToResult(\nif (viewer.cookieSource === cookieSources.BODY) {\nsessionChange.cookie = viewer.cookiePairString;\n} else {\n- addActualHTTPCookie(viewer, res);\n+ addActualHTTPCookie(viewer, res, appURLFacts);\n}\nif (viewer.sessionIdentifierType === sessionIdentifierTypes.BODY_SESSION_ID) {\nsessionChange.sessionID = viewer.sessionID ? viewer.sessionID : null;\n@@ -721,6 +719,7 @@ function addCookieToJSONResponse(\nres: $Response,\nresult: Object,\nexpectCookieInvalidation: boolean,\n+ appURLFacts: AppURLFacts,\n) {\nif (expectCookieInvalidation) {\nviewer.cookieInvalidated = false;\n@@ -729,20 +728,27 @@ function addCookieToJSONResponse(\nhandleAsyncPromise(extendCookieLifespan(viewer.cookieID));\n}\nif (viewer.sessionChanged) {\n- addSessionChangeInfoToResult(viewer, res, result);\n+ addSessionChangeInfoToResult(viewer, res, result, appURLFacts);\n} else if (viewer.cookieSource !== cookieSources.BODY) {\n- addActualHTTPCookie(viewer, res);\n+ addActualHTTPCookie(viewer, res, appURLFacts);\n}\n}\n-function addCookieToHomeResponse(viewer: Viewer, res: $Response) {\n+function addCookieToHomeResponse(\n+ viewer: Viewer,\n+ res: $Response,\n+ appURLFacts: AppURLFacts,\n+) {\nif (!viewer.getData().cookieInsertedThisRequest) {\nhandleAsyncPromise(extendCookieLifespan(viewer.cookieID));\n}\n- addActualHTTPCookie(viewer, res);\n+ addActualHTTPCookie(viewer, res, appURLFacts);\n}\n-const cookieOptions = {\n+function getCookieOptions(appURLFacts: AppURLFacts) {\n+ const { baseDomain, basePath, https } = appURLFacts;\n+ const domainAsURL = new url.URL(baseDomain);\n+ return {\ndomain: domainAsURL.hostname,\npath: basePath,\nhttpOnly: true,\n@@ -750,10 +756,20 @@ const cookieOptions = {\nmaxAge: cookieLifetime,\nsameSite: 'Strict',\n};\n-function addActualHTTPCookie(viewer: Viewer, res: $Response) {\n- res.cookie(viewer.cookieName, viewer.cookieString, cookieOptions);\n+}\n+\n+function addActualHTTPCookie(\n+ viewer: Viewer,\n+ res: $Response,\n+ appURLFacts: AppURLFacts,\n+) {\n+ res.cookie(\n+ viewer.cookieName,\n+ viewer.cookieString,\n+ getCookieOptions(appURLFacts),\n+ );\nif (viewer.cookieName !== viewer.initialCookieName) {\n- res.clearCookie(viewer.initialCookieName, cookieOptions);\n+ res.clearCookie(viewer.initialCookieName, getCookieOptions(appURLFacts));\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "server/src/utils/security-utils.js", "new_path": "server/src/utils/security-utils.js", "diff": "import type { $Request } from 'express';\n-import { getSquadCalURLFacts } from './urls';\n-\n-const { https } = getSquadCalURLFacts();\n+import { getAppURLFactsFromRequestURL } from './urls';\nfunction assertSecureRequest(req: $Request) {\n+ const { https } = getAppURLFactsFromRequestURL(req.url);\nif (https && req.get('X-Forwarded-SSL') !== 'on') {\nthrow new Error('insecure request');\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
choose which app url facts to use based on request url Summary: use getAppURLFactsFromRequestURL to choose which app URL facts to use. depends on D3406 Test Plan: flow Reviewers: palys-swm, atul, ashoat Reviewed By: palys-swm, ashoat Subscribers: ashoat, Adrian, karol-bisztyga, benschac Differential Revision: https://phabricator.ashoat.com/D3413
129,200
11.03.2022 17:56:32
18,000
02dc417d09f4d7d288e42f1a3900a6a836460821
use landing base route path to construct endpoints Summary: we should avoid hardcoding paths like /commlanding/. instead we should get the paths from the landing_url.json file. depends on D3413 Test Plan: flow Reviewers: atul, palys-swm, ashoat Subscribers: ashoat, Adrian, karol-bisztyga, benschac
[ { "change_type": "MODIFY", "old_path": "server/src/server.js", "new_path": "server/src/server.js", "diff": "@@ -58,9 +58,9 @@ if (cluster.isMaster) {\nconst router = express.Router();\nrouter.use('/images', express.static('images'));\n- router.use('/commlanding/images', express.static('images'));\n+ router.use(`${landingBaseRoutePath}images`, express.static('images'));\nrouter.use('/fonts', express.static('fonts'));\n- router.use('/commlanding/fonts', express.static('fonts'));\n+ router.use(`${landingBaseRoutePath}fonts`, express.static('fonts'));\nrouter.use('/misc', express.static('misc'));\nrouter.use(\n'/.well-known',\n@@ -81,7 +81,7 @@ if (cluster.isMaster) {\nexpress.static('app_compiled', compiledFolderOptions),\n);\nrouter.use(\n- '/commlanding/compiled',\n+ `${landingBaseRoutePath}compiled`,\nexpress.static('landing_compiled', compiledFolderOptions),\n);\nrouter.use('/', express.static('icons'));\n@@ -97,7 +97,10 @@ if (cluster.isMaster) {\n);\n}\n- router.post('/commlanding/subscribe_email', emailSubscriptionResponder);\n+ router.post(\n+ `${landingBaseRoutePath}subscribe_email`,\n+ emailSubscriptionResponder,\n+ );\nrouter.get(\n'/create_version/:deviceType/:codeVersion',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
use landing base route path to construct endpoints Summary: we should avoid hardcoding paths like /commlanding/. instead we should get the paths from the landing_url.json file. depends on D3413 Test Plan: flow Reviewers: atul, palys-swm, ashoat Reviewed By: palys-swm, ashoat Subscribers: ashoat, Adrian, karol-bisztyga, benschac Differential Revision: https://phabricator.ashoat.com/D3414
129,190
21.03.2022 10:32:21
-3,600
aecb238e4d71a66292c293cdfd2ad140cb659de8
[services] Backup - remove auth from implementation Summary: We will no longer use authentication in the backup service. Test Plan: ``` cd services yarn run-backup-service ``` This should build Reviewers: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp", "new_path": "services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp", "diff": "@@ -23,32 +23,10 @@ BackupServiceImpl::CreateNewBackup(grpc::CallbackServerContext *context) {\nclass CreateNewBackupReactor : public BidiReactorBase<\nbackup::CreateNewBackupRequest,\nbackup::CreateNewBackupResponse> {\n- auth::AuthenticationManager authenticationManager;\n-\npublic:\nstd::unique_ptr<grpc::Status> handleRequest(\nbackup::CreateNewBackupRequest request,\nbackup::CreateNewBackupResponse *response) override {\n- if (this->authenticationManager.getState() !=\n- auth::AuthenticationState::SUCCESS &&\n- !request.has_authenticationrequestdata()) {\n- return std::make_unique<grpc::Status>(\n- grpc::StatusCode::INTERNAL,\n- \"authentication has not been finished properly\");\n- }\n- if (this->authenticationManager.getState() ==\n- auth::AuthenticationState::FAIL) {\n- return std::make_unique<grpc::Status>(\n- grpc::StatusCode::INTERNAL, \"authentication failure\");\n- }\n- if (this->authenticationManager.getState() !=\n- auth::AuthenticationState::SUCCESS) {\n- backup::FullAuthenticationResponseData *authResponse =\n- this->authenticationManager.processRequest(\n- request.authenticationrequestdata());\n- response->set_allocated_authenticationresponsedata(authResponse);\n- return nullptr;\n- }\n// TODO handle request\nreturn std::make_unique<grpc::Status>(\ngrpc::StatusCode::UNIMPLEMENTED, \"unimplemented\");\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - remove auth from implementation Summary: We will no longer use authentication in the backup service. Test Plan: ``` cd services yarn run-backup-service ``` This should build Reviewers: palys-swm Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3460
129,179
15.03.2022 12:41:29
14,400
ec9b4fe9e731605cb74587e445d790922777d031
[web] [refactor] move use unread into its own hook Summary: Move unread toggle into it's own hook. This functionality is used in native as well. {F21455} Test Plan: Toggle unread in web, make sure the functionality still works. Reviewers: atul, palys-swm Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "ADD", "old_path": null, "new_path": "lib/hooks/toggle-unread-status.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+\n+import {\n+ setThreadUnreadStatus,\n+ setThreadUnreadStatusActionTypes,\n+} from '../actions/activity-actions';\n+import type {\n+ SetThreadUnreadStatusPayload,\n+ SetThreadUnreadStatusRequest,\n+} from '../types/activity-types';\n+import type { ThreadInfo } from '../types/thread-types';\n+import { useDispatchActionPromise, useServerCall } from '../utils/action-utils';\n+\n+function useToggleUnreadStatus(\n+ threadInfo: ThreadInfo,\n+ mostRecentNonLocalMessage: ?string,\n+ afterAction: () => void,\n+): () => void {\n+ const dispatchActionPromise = useDispatchActionPromise();\n+ const boundSetThreadUnreadStatus: (\n+ request: SetThreadUnreadStatusRequest,\n+ ) => Promise<SetThreadUnreadStatusPayload> = useServerCall(\n+ setThreadUnreadStatus,\n+ );\n+ const toggleUnreadStatus = React.useCallback(() => {\n+ const { unread } = threadInfo.currentUser;\n+ const request = {\n+ threadID: threadInfo.id,\n+ unread: !unread,\n+ latestMessage: mostRecentNonLocalMessage,\n+ };\n+ dispatchActionPromise(\n+ setThreadUnreadStatusActionTypes,\n+ boundSetThreadUnreadStatus(request),\n+ undefined,\n+ {\n+ threadID: threadInfo.id,\n+ unread: !unread,\n+ },\n+ );\n+ afterAction();\n+ }, [\n+ threadInfo,\n+ mostRecentNonLocalMessage,\n+ dispatchActionPromise,\n+ afterAction,\n+ boundSetThreadUnreadStatus,\n+ ]);\n+\n+ return toggleUnreadStatus;\n+}\n+\n+export default useToggleUnreadStatus;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list-item-menu.react.js", "new_path": "web/chat/chat-thread-list-item-menu.react.js", "diff": "import classNames from 'classnames';\nimport * as React from 'react';\n-import {\n- setThreadUnreadStatusActionTypes,\n- setThreadUnreadStatus,\n-} from 'lib/actions/activity-actions';\n-import type {\n- SetThreadUnreadStatusPayload,\n- SetThreadUnreadStatusRequest,\n-} from 'lib/types/activity-types';\n+import useToggleUnreadStatus from 'lib/hooks/toggle-unread-status';\nimport type { ThreadInfo } from 'lib/types/thread-types';\n-import {\n- useServerCall,\n- useDispatchActionPromise,\n-} from 'lib/utils/action-utils';\nimport SWMansionIcon from '../SWMansionIcon.react';\nimport css from './chat-thread-list-item-menu.css';\n@@ -38,37 +27,11 @@ function ChatThreadListItemMenu(props: Props): React.Node {\n}, []);\nconst { threadInfo, mostRecentNonLocalMessage } = props;\n- const dispatchActionPromise = useDispatchActionPromise();\n- const boundSetThreadUnreadStatus: (\n- request: SetThreadUnreadStatusRequest,\n- ) => Promise<SetThreadUnreadStatusPayload> = useServerCall(\n- setThreadUnreadStatus,\n- );\n- const toggleUnreadStatus = React.useCallback(() => {\n- const { unread } = threadInfo.currentUser;\n- const request = {\n- threadID: threadInfo.id,\n- unread: !unread,\n- latestMessage: mostRecentNonLocalMessage,\n- };\n- dispatchActionPromise(\n- setThreadUnreadStatusActionTypes,\n- boundSetThreadUnreadStatus(request),\n- undefined,\n- {\n- threadID: threadInfo.id,\n- unread: !unread,\n- },\n- );\n- hideMenu();\n- }, [\n+ const toggleUnreadStatus = useToggleUnreadStatus(\nthreadInfo,\nmostRecentNonLocalMessage,\n- dispatchActionPromise,\nhideMenu,\n- boundSetThreadUnreadStatus,\n- ]);\n-\n+ );\nconst toggleUnreadStatusButtonText = `Mark as ${\nthreadInfo.currentUser.unread ? 'read' : 'unread'\n}`;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] move use unread into its own hook Summary: Move unread toggle into it's own hook. This functionality is used in native as well. https://linear.app/comm/issue/ENG-861/refactor-unreadstatus-into-hook-for-both-native-and-web {F21455} Test Plan: Toggle unread in web, make sure the functionality still works. Reviewers: atul, palys-swm Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3418
129,179
21.03.2022 14:50:32
14,400
2674c50021d3466222de55b056d6aa60bc916cf2
[web] [fix] update icons svg json to remove blue pre-fill colors. Summary: before: {F23760} after: {F23761} {F23762} Test Plan: icons should render correctly with correct color Reviewers: atul, def-au1t, palys-swm, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/icons/selection.json", "new_path": "web/icons/selection.json", "diff": "],\n\"attrs\": [\n{\n- \"fill\": \"rgb(0, 26, 114)\",\n\"opacity\": 0.15000000596046448\n},\n{\n- \"fill\": \"rgb(0, 26, 114)\",\n\"opacity\": 0.15000000596046448\n},\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n+ {}\n],\n\"isMulticolor\": true,\n\"isMulticolor2\": true,\n},\n\"attrs\": [\n{\n- \"fill\": \"rgb(0, 26, 114)\",\n\"opacity\": 0.15000000596046448\n},\n{\n- \"fill\": \"rgb(0, 26, 114)\",\n\"opacity\": 0.15000000596046448\n},\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n+ {}\n],\n\"properties\": {\n\"order\": 525,\n\"paths\": [\n\"M662.626 406.627c12.497-12.497 12.497-32.758 0-45.255s-32.759-12.497-45.257 0l45.257 45.255zM361.37 617.374c-12.497 12.497-12.497 32.755 0 45.252s32.758 12.497 45.255 0l-45.255-45.252zM406.63 361.373c-12.497-12.497-32.758-12.497-45.255 0s-12.497 32.758 0 45.255l45.255-45.255zM617.374 662.626c12.497 12.497 32.759 12.497 45.257 0s12.497-32.755 0-45.252l-45.257 45.252zM617.37 361.373l-256 256.001 45.255 45.252 256.001-255.999-45.257-45.255zM361.375 406.627l255.999 255.999 45.257-45.252-256-256.001-45.255 45.255zM864 512c0 194.402-157.598 352-352 352v64c229.751 0 416-186.249 416-416h-64zM512 864c-194.404 0-352-157.598-352-352h-64c0 229.751 186.249 416 416 416v-64zM160 512c0-194.404 157.596-352 352-352v-64c-229.751 0-416 186.249-416 416h64zM512 160c194.402 0 352 157.596 352 352h64c0-229.751-186.249-416-416-416v64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-cross-circle\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 527,\n\"id\": 47,\n\"paths\": [\n\"M213.333 128v-32c-17.673 0-32 14.327-32 32h32zM810.667 896v32c17.673 0 32-14.327 32-32h-32zM213.333 896h-32c0 17.673 14.327 32 32 32v-32zM597.333 128l22.626-22.627c-5.999-6.001-14.14-9.373-22.626-9.373v32zM810.667 341.333h32c0-8.487-3.371-16.626-9.374-22.627l-22.626 22.627zM810.667 864h-597.333v64h597.333v-64zM245.333 896v-768h-64v768h64zM213.333 160h384v-64h-384v64zM778.667 341.333v554.667h64v-554.667h-64zM574.707 150.627l213.333 213.333 45.252-45.255-213.333-213.333-45.252 45.255zM522.667 128v170.667h64v-170.667h-64zM640 416h170.667v-64h-170.667v64zM522.667 298.667c0 64.801 52.531 117.333 117.333 117.333v-64c-29.457 0-53.333-23.878-53.333-53.333h-64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-document-clean\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 528,\n\"id\": 48,\n\"paths\": [\n\"M213.333 469.333v-32c-17.673 0-32 14.327-32 32h32zM810.667 469.333h32c0-17.673-14.327-32-32-32v32zM810.667 896v32c17.673 0 32-14.327 32-32h-32zM213.333 896h-32c0 17.673 14.327 32 32 32v-32zM213.333 501.333h597.333v-64h-597.333v64zM778.667 469.333v426.667h64v-426.667h-64zM810.667 864h-597.333v64h597.333v-64zM245.333 896v-426.667h-64v426.667h64zM373.333 298.667c0-76.584 62.084-138.667 138.667-138.667v-64c-111.93 0-202.667 90.737-202.667 202.667h64zM512 160c76.582 0 138.667 62.083 138.667 138.667h64c0-111.93-90.735-202.667-202.667-202.667v64zM309.333 298.667v170.667h64v-170.667h-64zM650.667 298.667v170.667h64v-170.667h-64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-lock-on\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 532,\n\"id\": 52,\n\"paths\": [\n\"M512 736c-17.673 0-32 14.327-32 32s14.327 32 32 32v-64zM512.427 800c17.673 0 32-14.327 32-32s-14.327-32-32-32v64zM512 800h0.427v-64h-0.427v64zM341.333 160h341.333v-64h-341.333v64zM736 213.333v597.333h64v-597.333h-64zM682.667 864h-341.333v64h341.333v-64zM288 810.667v-597.333h-64v597.333h64zM341.333 864c-29.455 0-53.333-23.876-53.333-53.333h-64c0 64.802 52.532 117.333 117.333 117.333v-64zM736 810.667c0 29.457-23.876 53.333-53.333 53.333v64c64.802 0 117.333-52.531 117.333-117.333h-64zM682.667 160c29.457 0 53.333 23.878 53.333 53.333h64c0-64.801-52.531-117.333-117.333-117.333v64zM341.333 96c-64.801 0-117.333 52.532-117.333 117.333h64c0-29.455 23.878-53.333 53.333-53.333v-64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-smartphone\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 535,\n\"id\": 55,\n\"paths\": [\n\"M544 298.667c0-17.673-14.327-32-32-32s-32 14.327-32 32h64zM480 597.333c0 17.673 14.327 32 32 32s32-14.327 32-32h-64zM544 724.907c0-17.673-14.327-32-32-32s-32 14.327-32 32h64zM480 725.333c0 17.673 14.327 32 32 32s32-14.327 32-32h-64zM480 298.667v298.667h64v-298.667h-64zM480 724.907v0.427h64v-0.427h-64zM864 512c0 194.402-157.598 352-352 352v64c229.751 0 416-186.249 416-416h-64zM512 864c-194.404 0-352-157.598-352-352h-64c0 229.751 186.249 416 416 416v-64zM160 512c0-194.404 157.596-352 352-352v-64c-229.751 0-416 186.249-416 416h64zM512 160c194.402 0 352 157.596 352 352h64c0-229.751-186.249-416-416-416v64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-warning-circle\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 537,\n\"id\": 57,\n\"paths\": [\n\"M323.66 615.006v0zM444.339 615.006v0zM451.661 622.327v0zM572.339 622.327v0zM664.994 529.673v0zM785.673 529.673v0zM213.333 202.667h597.333v-64h-597.333v64zM821.333 213.333v597.333h64v-597.333h-64zM810.667 821.333h-597.333v64h597.333v-64zM202.667 810.667v-597.333h-64v597.333h64zM213.333 821.333c-5.891 0-10.667-4.774-10.667-10.667h-64c0 41.237 33.429 74.667 74.667 74.667v-64zM821.333 810.667c0 5.892-4.774 10.667-10.667 10.667v64c41.237 0 74.667-33.429 74.667-74.667h-64zM810.667 202.667c5.892 0 10.667 4.776 10.667 10.667h64c0-41.237-33.429-74.667-74.667-74.667v64zM213.333 138.667c-41.237 0-74.667 33.429-74.667 74.667h64c0-5.891 4.776-10.667 10.667-10.667v-64zM193.294 790.626l152.994-152.994-45.255-45.252-152.994 152.994 45.255 45.252zM421.712 637.632l7.322 7.322 45.252-45.252-7.322-7.322-45.253 45.252zM594.965 644.954l92.655-92.655-45.252-45.252-92.655 92.655 45.252 45.252zM763.046 552.299l67.661 67.661 45.252-45.252-67.661-67.661-45.252 45.252zM687.62 552.299c20.83-20.826 54.596-20.826 75.426 0l45.252-45.252c-45.82-45.824-120.111-45.824-165.931 0l45.252 45.252zM429.035 644.954c45.82 45.824 120.111 45.824 165.931 0l-45.252-45.252c-20.83 20.826-54.596 20.826-75.426 0l-45.252 45.252zM346.288 637.632c20.828-20.826 54.597-20.826 75.424 0l45.253-45.252c-45.82-45.824-120.111-45.824-165.932 0l45.255 45.252zM424.149 377.429c0 25.804-20.958 46.763-46.763 46.763v64c61.15 0 110.763-49.613 110.763-110.763h-64zM377.387 424.192c-25.75 0-46.72-20.947-46.72-46.763h-64c0 61.137 49.601 110.763 110.72 110.763v-64zM330.667 377.429c0-25.815 20.97-46.763 46.72-46.763v-64c-61.119 0-110.72 49.623-110.72 110.763h64zM377.387 330.667c25.804 0 46.763 20.958 46.763 46.763h64c0-61.15-49.613-110.763-110.763-110.763v64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-image-1\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 546,\n\"id\": 36,\n\"attrs\": [\n{\n\"fill\": \"none\",\n- \"stroke\": \"rgb(128, 128, 128)\",\n\"strokeLinejoin\": \"round\",\n\"strokeLinecap\": \"round\",\n\"strokeMiterlimit\": \"4\",\n\"paths\": [\n\"M544 724.907c0-17.673-14.327-32-32-32s-32 14.327-32 32h64zM480 725.333c0 17.673 14.327 32 32 32s32-14.327 32-32h-64zM480 597.333c0 17.673 14.327 32 32 32s32-14.327 32-32h-64zM353.104 383.426c-4.602 17.064 5.501 34.627 22.564 39.228s34.627-5.501 39.228-22.564l-61.792-16.664zM480 724.907v0.427h64v-0.427h-64zM608 422.788c0 25.515-15.876 39.002-50.027 62.289-28.855 19.674-77.973 50.044-77.973 112.256h64c0-23.121 14.882-35.418 50.027-59.379 29.85-20.352 77.973-51.469 77.973-115.166h-64zM512 330.667c54.899 0 96 41.983 96 92.121h64c0-86.962-71.249-156.121-160-156.121v64zM414.896 400.090c10.379-38.486 49.816-69.423 97.104-69.423v-64c-73.907 0-140.401 48.176-158.896 116.759l61.792 16.664zM864 512c0 194.402-157.598 352-352 352v64c229.751 0 416-186.249 416-416h-64zM512 864c-194.404 0-352-157.598-352-352h-64c0 229.751 186.249 416 416 416v-64zM160 512c0-194.404 157.596-352 352-352v-64c-229.751 0-416 186.249-416 416h64zM512 160c194.402 0 352 157.596 352 352h64c0-229.751-186.249-416-416-416v64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-question-circle\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 553,\n\"id\": 6,\n\"paths\": [\n\"M170.667 725.333l-28.622-14.31c-4.96 9.92-4.43 21.7 1.401 31.134s16.131 15.177 27.221 15.177v-32zM853.333 725.333v32c11.089 0 21.389-5.743 27.221-15.177 5.828-9.434 6.362-21.214 1.399-31.134l-28.621 14.31zM288 384c0-123.712 100.288-224 224-224v-64c-159.058 0-288 128.942-288 288h64zM512 160c123.712 0 224 100.288 224 224h64c0-159.058-128.943-288-288-288v64zM224 384c0 80.495-20.224 162.146-41.024 224.546-10.337 31.010-20.67 56.841-28.388 74.85-3.856 8.994-7.049 16.017-9.252 20.736-1.101 2.359-1.953 4.143-2.516 5.303-0.281 0.585-0.49 1.007-0.621 1.276-0.065 0.132-0.111 0.226-0.137 0.277-0.013 0.026-0.021 0.043-0.023 0.047s-0.002 0.004-0 0c0 0 0.002-0.004 0.003-0.004 0.002-0.004 0.005-0.009 28.626 14.302s28.625 14.306 28.628 14.298c0.002-0.004 0.006-0.009 0.009-0.017 0.006-0.013 0.014-0.030 0.023-0.047 0.018-0.034 0.041-0.081 0.069-0.137 0.056-0.115 0.133-0.269 0.229-0.465 0.192-0.388 0.463-0.943 0.806-1.651 0.688-1.421 1.669-3.473 2.901-6.114 2.464-5.282 5.937-12.924 10.082-22.596 8.282-19.324 19.282-46.827 30.278-79.817 21.866-65.6 44.309-154.615 44.309-244.787h-64zM170.667 757.333h682.667v-64h-682.667v64zM853.333 725.333c28.621-14.31 28.625-14.306 28.625-14.302 0 0 0.004 0.004 0.004 0.004 0 0.004 0 0.004 0 0-0.004-0.004-0.013-0.021-0.026-0.047-0.026-0.051-0.073-0.145-0.137-0.277-0.132-0.269-0.341-0.691-0.619-1.276-0.563-1.161-1.417-2.944-2.517-5.303-2.202-4.719-5.397-11.742-9.25-20.736-7.718-18.010-18.052-43.84-28.39-74.85-20.8-62.4-41.024-144.051-41.024-224.546h-64c0 90.172 22.443 179.187 44.309 244.787 10.995 32.99 21.995 60.493 30.276 79.817 4.147 9.673 7.62 17.314 10.082 22.596 1.233 2.641 2.214 4.693 2.901 6.114 0.346 0.708 0.614 1.263 0.806 1.651 0.098 0.196 0.175 0.35 0.23 0.465 0.026 0.055 0.051 0.102 0.068 0.137 0.009 0.017 0.017 0.034 0.021 0.047 0.004 0.009 0.009 0.013 0.009 0.017 0.004 0.009 0.009 0.013 28.629-14.298zM608 768c0 53.018-42.982 96-96 96v64c88.367 0 160-71.633 160-160h-64zM512 864c-53.018 0-96-42.982-96-96h-64c0 88.367 71.634 160 160 160v-64zM416 768v-42.667h-64v42.667h64zM672 768v-42.667h-64v42.667h64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-bell\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 558,\n\"id\": 11,\n\"paths\": [\n\"M170.667 682.667l-22.627-22.626-9.373 9.37v13.257h32zM725.333 128l22.626-22.627c-12.497-12.497-32.755-12.497-45.252 0l22.626 22.627zM896 298.667l22.626 22.627c12.497-12.497 12.497-32.758 0-45.255l-22.626 22.627zM341.333 853.333v32h13.255l9.373-9.374-22.627-22.626zM170.667 853.333h-32c0 17.673 14.327 32 32 32v-32zM193.294 705.293l554.665-554.665-45.252-45.255-554.668 554.668 45.255 45.252zM702.707 150.627l170.667 170.667 45.252-45.255-170.667-170.667-45.252 45.255zM873.374 276.039l-554.668 554.668 45.255 45.252 554.665-554.665-45.252-45.255zM341.333 821.333h-170.667v64h170.667v-64zM202.667 853.333v-170.667h-64v170.667h64zM574.707 278.627l170.667 170.665 45.252-45.254-170.667-170.667-45.252 45.255z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-edit-1\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 565,\n\"id\": 18,\n\"paths\": [\n\"M480 725.333c0 17.673 14.327 32 32 32s32-14.327 32-32h-64zM544 426.667c0-17.673-14.327-32-32-32s-32 14.327-32 32h64zM480 299.092c0 17.673 14.327 32 32 32s32-14.327 32-32h-64zM544 298.665c0-17.673-14.327-32-32-32s-32 14.327-32 32h64zM544 725.333v-298.667h-64v298.667h64zM544 299.092v-0.426h-64v0.426h64zM864 512c0 194.402-157.598 352-352 352v64c229.751 0 416-186.249 416-416h-64zM512 864c-194.404 0-352-157.598-352-352h-64c0 229.751 186.249 416 416 416v-64zM160 512c0-194.404 157.596-352 352-352v-64c-229.751 0-416 186.249-416 416h64zM512 160c194.402 0 352 157.596 352 352h64c0-229.751-186.249-416-416-416v64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-info-circle\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 569,\n\"id\": 22,\n\"paths\": [\n\"M544 341.333c0-17.673-14.327-32-32-32s-32 14.327-32 32h64zM480 682.667c0 17.673 14.327 32 32 32s32-14.327 32-32h-64zM341.333 480c-17.673 0-32 14.327-32 32s14.327 32 32 32v-64zM682.667 544c17.673 0 32-14.327 32-32s-14.327-32-32-32v64zM480 341.333v341.333h64v-341.333h-64zM341.333 544h341.333v-64h-341.333v64zM864 512c0 194.402-157.598 352-352 352v64c229.751 0 416-186.249 416-416h-64zM512 864c-194.404 0-352-157.598-352-352h-64c0 229.751 186.249 416 416 416v-64zM160 512c0-194.404 157.596-352 352-352v-64c-229.751 0-416 186.249-416 416h64zM512 160c194.402 0 352 157.596 352 352h64c0-229.751-186.249-416-416-416v64z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-plus-circle\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 577,\n\"id\": 30,\n\"paths\": [\n\"M830.707 875.959c12.497 12.497 32.755 12.497 45.252 0s12.497-32.755 0-45.252l-45.252 45.252zM736 448c0 159.057-128.943 288-288 288v64c194.402 0 352-157.598 352-352h-64zM448 736c-159.058 0-288-128.943-288-288h-64c0 194.402 157.596 352 352 352v-64zM160 448c0-159.058 128.942-288 288-288v-64c-194.404 0-352 157.596-352 352h64zM448 160c159.057 0 288 128.942 288 288h64c0-194.404-157.598-352-352-352v64zM875.959 830.707l-178.667-178.671-45.257 45.257 178.671 178.667 45.252-45.252z\"\n],\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"isMulticolor\": false,\n\"isMulticolor2\": false,\n\"grid\": 24,\n\"tags\": [\"outline-search\"]\n},\n- \"attrs\": [\n- {\n- \"fill\": \"rgb(0, 26, 114)\"\n- }\n- ],\n+ \"attrs\": [{}],\n\"properties\": {\n\"order\": 579,\n\"id\": 32,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] ENG-897 update icons svg json to remove blue pre-fill colors. Summary: https://linear.app/comm/issue/ENG-897/fix-icons-with-blue-fill before: {F23760} after: {F23761} {F23762} Test Plan: icons should render correctly with correct color Reviewers: atul, def-au1t, palys-swm, ashoat Reviewed By: def-au1t, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3458
129,179
21.03.2022 14:58:55
14,400
31321ec29f341b13f561e2366cd01c23a38aba03
[web] [fix] align unread buttons Summary: there isn't a design for unread button, but I'd assume we would want to align the buttons across the board. Test Plan: make sure buttons are aligned. (three dot vertical buttons) Reviewers: atul, def-au1t, palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list-item-menu.css", "new_path": "web/chat/chat-thread-list-item-menu.css", "diff": "@@ -44,6 +44,10 @@ div.sidebar:hover .menu {\ndisplay: block;\n}\n+.menuSidebar {\n+ padding-right: 2px;\n+}\n+\nbutton.menuContent {\nborder: none;\ncursor: pointer;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list-item-menu.react.js", "new_path": "web/chat/chat-thread-list-item-menu.react.js", "diff": "@@ -36,12 +36,15 @@ function ChatThreadListItemMenu(props: Props): React.Node {\nthreadInfo.currentUser.unread ? 'read' : 'unread'\n}`;\n- const menuIconSize = renderStyle === 'chat' ? 24 : 16;\n+ const menuIconSize = renderStyle === 'chat' ? 24 : 20;\n+ const menuCls = classNames(css.menu, {\n+ [css.menuSidebar]: renderStyle === 'thread',\n+ });\nconst btnCls = classNames(css.menuContent, {\n[css.menuContentVisible]: menuVisible,\n});\nreturn (\n- <div className={css.menu} onMouseLeave={hideMenu}>\n+ <div className={menuCls} onMouseLeave={hideMenu}>\n<button onClick={toggleMenu}>\n<SWMansionIcon icon=\"menu-vertical\" size={menuIconSize} />\n</button>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] align unread buttons Summary: there isn't a design for unread button, but I'd assume we would want to align the buttons across the board. Test Plan: make sure buttons are aligned. (three dot vertical buttons) Reviewers: atul, def-au1t, palys-swm Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3441
129,190
22.03.2022 09:38:37
-3,600
82073b570fb58b893555a4d486ab2d45ed1f4706
[services] Add comments about indexes Summary: Raised here Adding comments in places where database indexes are needed. Test Plan: None, these are just comments Reviewers: palys-swm, varun, atul, geekbrother, jimpo, ashoat Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/BackupItem.h", "new_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/BackupItem.h", "diff": "@@ -9,6 +9,16 @@ namespace comm {\nnamespace network {\nnamespace database {\n+/**\n+ * this class is used for representing two things: the rows in the main table,\n+ * and also the rows in the secondary index\n+ *\n+ * Needs userID(pk)-created(sk)-index that projects:\n+ * userID\n+ * backupID\n+ * created\n+ * recoveryData\n+ */\nclass BackupItem : public Item {\nstd::string userID;\n" }, { "change_type": "MODIFY", "old_path": "services/blob/docker-server/contents/server/src/DatabaseEntities/ReverseIndexItem.h", "new_path": "services/blob/docker-server/contents/server/src/DatabaseEntities/ReverseIndexItem.h", "diff": "@@ -8,6 +8,11 @@ namespace comm {\nnamespace network {\nnamespace database {\n+/**\n+ * Needs blobHash(pk)-index that projects:\n+ * blobHash\n+ * holder\n+ */\nclass ReverseIndexItem : public Item {\nstd::string holder;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Add comments about indexes Summary: Raised here https://phabricator.ashoat.com/D3087#86770 Adding comments in places where database indexes are needed. Test Plan: None, these are just comments Reviewers: palys-swm, varun, atul, geekbrother, jimpo, ashoat Reviewed By: ashoat Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3420
129,179
14.03.2022 12:31:27
14,400
f2ca31d0a87be35a49ebaa2ae41c4dc868725d76
[web] [fix] hover state background color on thread list Summary: update the hover color before: {F21536} after: {F21535} Test Plan: hover color should match figma Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.css", "new_path": "web/chat/chat-thread-list.css", "diff": "@@ -24,9 +24,19 @@ div.thread:first-child {\npadding-top: 6px;\n}\ndiv.activeThread,\n-div.thread:hover,\ndiv.threadListSidebar:hover {\n- background: var(--selected-thread-bg);\n+ background: var(--thread-active-bg);\n+}\n+\n+div.activeThread :is(div.dark, button, .lastMessage span.light, .title) {\n+ color: var(--fg);\n+}\n+\n+div.activeThread.thread:hover {\n+ background: var(--thread-active-bg);\n+}\n+div.thread:hover {\n+ background: var(--thread-hover-bg);\n}\ndiv.title {\nflex: 1;\n" }, { "change_type": "MODIFY", "old_path": "web/theme.css", "new_path": "web/theme.css", "diff": "--chat-confirmation-icon: var(--violet-dark-100);\n--keyserver-selection: var(--violet-dark-60);\n--thread-selection: var(--violet-light-80);\n- --selected-thread-bg: var(--shades-black-90);\n+ --thread-hover-bg: var(--shades-black-90);\n+ --thread-active-bg: var(--shades-black-80);\n--chat-timestamp-color: var(--shades-black-60);\n--tool-tip-bg: var(--shades-black-80);\n--tool-tip-color: var(--shades-white-60);\n--modal-bg: var(--shades-black-90);\n--join-bg: var(--shades-black-90);\n--help-color: var(--shades-black-60);\n- --breadcrumb-color: var(--shades-black-60);\n+ --breadcrumb-color: var(--shades-white-60);\n--breadcrumb-color-unread: var(--shades-white-60);\n--btn-secondary-border: var(--shades-black-60);\n--thread-color-read: var(--shades-black-60);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] hover state background color on thread list Summary: https://linear.app/comm/issue/ENG-869/thread-list-hover-background-is-wrong-color, update the hover color before: {F21536} after: {F21535} Test Plan: hover color should match figma Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3421
129,179
23.03.2022 09:40:36
14,400
a5cee196b7a61aff71d65f01b9b964245d1d2703
[web] [refactor] move props to single destructure in top of chat thread list item menu component Summary: move props destructure to one place Test Plan: N/A - shouldn't get any flow errors. Page should render normally Reviewers: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list-item-menu.react.js", "new_path": "web/chat/chat-thread-list-item-menu.react.js", "diff": "@@ -15,9 +15,8 @@ type Props = {\n+renderStyle?: 'chat' | 'thread',\n};\nfunction ChatThreadListItemMenu(props: Props): React.Node {\n- const { renderStyle = 'chat' } = props;\n+ const { renderStyle = 'chat', threadInfo, mostRecentNonLocalMessage } = props;\nconst [menuVisible, setMenuVisible] = React.useState(false);\n-\nconst toggleMenu = React.useCallback(() => {\nsetMenuVisible(!menuVisible);\n}, [menuVisible]);\n@@ -26,7 +25,6 @@ function ChatThreadListItemMenu(props: Props): React.Node {\nsetMenuVisible(false);\n}, []);\n- const { threadInfo, mostRecentNonLocalMessage } = props;\nconst toggleUnreadStatus = useToggleUnreadStatus(\nthreadInfo,\nmostRecentNonLocalMessage,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] move props to single destructure in top of chat thread list item menu component Summary: move props destructure to one place Test Plan: N/A - shouldn't get any flow errors. Page should render normally Reviewers: atul Reviewed By: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3493
129,179
25.03.2022 12:54:32
14,400
dd249a8d6049e0ed68f3e6a5c63e54cc16de0a3d
[web] [refactor] destructure props in message preview component Summary: no functionality changes. Just keeping the component consistent with the rest of the codebase and destructuring props. Test Plan: message preview component still works like it did before changes. Reviewers: atul, def-au1t, palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/message-preview.react.js", "new_path": "web/chat/message-preview.react.js", "diff": "@@ -22,7 +22,15 @@ type Props = {\n+threadInfo: ThreadInfo,\n};\nfunction MessagePreview(props: Props): React.Node {\n- if (!props.messageInfo) {\n+ const {\n+ messageInfo: originalMessageInfo,\n+ threadInfo,\n+ threadInfo: {\n+ currentUser: { unread },\n+ },\n+ } = props;\n+\n+ if (!originalMessageInfo) {\nreturn (\n<div className={classNames(css.lastMessage, css.dark, css.italic)}>\nNo messages\n@@ -30,20 +38,20 @@ function MessagePreview(props: Props): React.Node {\n);\n}\nconst messageInfo: ComposableMessageInfo | RobotextMessageInfo =\n- props.messageInfo.type === messageTypes.SIDEBAR_SOURCE\n- ? props.messageInfo.sourceMessage\n- : props.messageInfo;\n- const unread = props.threadInfo.currentUser.unread;\n+ originalMessageInfo.type === messageTypes.SIDEBAR_SOURCE\n+ ? originalMessageInfo.sourceMessage\n+ : originalMessageInfo;\n+\nconst messageTitle = getMessageTitle(\nmessageInfo,\n- props.threadInfo,\n+ threadInfo,\ngetDefaultTextMessageRules().simpleMarkdownRules,\n);\nif (messageInfo.type === messageTypes.TEXT) {\nlet usernameText = null;\nif (\n- threadIsGroupChat(props.threadInfo) ||\n- props.threadInfo.name !== '' ||\n+ threadIsGroupChat(threadInfo) ||\n+ threadInfo.name !== '' ||\nmessageInfo.creator.isViewer\n) {\nconst userString = stringForUser(messageInfo.creator);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] destructure props in message preview component Summary: no functionality changes. Just keeping the component consistent with the rest of the codebase and destructuring props. Test Plan: message preview component still works like it did before changes. Reviewers: atul, def-au1t, palys-swm Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3504
129,179
25.03.2022 13:02:46
14,400
ec5704f78a30b36694686fbd1db118150164eb29
[web] [refactor] message preview styles solidified into one ternary statement Summary: move styles into a single call Test Plan: click and hover about chat thread list items. Functionality should be the same Reviewers: atul, def-au1t, palys-swm, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.css", "new_path": "web/chat/chat-thread-list.css", "diff": "@@ -28,11 +28,11 @@ div.threadListSidebar:hover {\nbackground: var(--thread-active-bg);\n}\n-div.activeThread :is(div.dark, .lastMessage span.light, .title) {\n+div.activeThread :is(div.dark, .lastMessage span.read, .title) {\ncolor: var(--fg);\n}\n-div.activeThread .lastMessage.light {\n+div.activeThread .lastMessage.read {\ncolor: var(--fg);\n}\n@@ -113,13 +113,13 @@ div.unread {\ncolor: var(--fg);\nfont-weight: var(--semi-bold);\n}\n-div.lastMessage.white {\n+div.lastMessage.unread {\ncolor: var(--fg);\n}\ndiv.dark {\ncolor: var(--thread-color-read);\n}\n-.light {\n+.read {\ncolor: var(--thread-from-color-read);\n}\ndiv.dotContainer {\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-preview.react.js", "new_path": "web/chat/message-preview.react.js", "diff": "@@ -30,6 +30,7 @@ function MessagePreview(props: Props): React.Node {\n},\n} = props;\n+ const colorStyle = unread ? css.unread : css.read;\nif (!originalMessageInfo) {\nreturn (\n<div className={classNames(css.lastMessage, css.dark, css.italic)}>\n@@ -56,10 +57,8 @@ function MessagePreview(props: Props): React.Node {\n) {\nconst userString = stringForUser(messageInfo.creator);\nconst username = `${userString}: `;\n- const usernameStyle = unread ? css.white : css.light;\n- usernameText = <span className={usernameStyle}>{username}</span>;\n+ usernameText = <span className={colorStyle}>{username}</span>;\n}\n- const colorStyle = unread ? css.white : css.light;\nreturn (\n<div className={classNames(css.lastMessage, colorStyle)}>\n{usernameText}\n@@ -67,9 +66,8 @@ function MessagePreview(props: Props): React.Node {\n</div>\n);\n} else {\n- const colorStyle = unread ? css.white : css.light;\nreturn (\n- <div className={classNames([css.lastMessage, colorStyle])}>\n+ <div className={classNames(css.lastMessage, colorStyle)}>\n{messageTitle}\n</div>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] message preview styles solidified into one ternary statement Summary: move styles into a single call Test Plan: click and hover about chat thread list items. Functionality should be the same Reviewers: atul, def-au1t, palys-swm, ashoat Reviewed By: palys-swm, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3505
129,179
25.03.2022 13:31:21
14,400
426e725ba0427e10dbfdd7447fdbb3a187265842
[web] [refactor] simplify username logic in message preview Summary: simplify rendering logic for username in message preview Test Plan: username logic is the same as production. No new functionality Reviewers: atul, def-au1t, palys-swm, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/message-preview.react.js", "new_path": "web/chat/message-preview.react.js", "diff": "@@ -48,30 +48,24 @@ function MessagePreview(props: Props): React.Node {\nthreadInfo,\ngetDefaultTextMessageRules().simpleMarkdownRules,\n);\n- if (messageInfo.type === messageTypes.TEXT) {\n+\nlet usernameText = null;\nif (\n- threadIsGroupChat(threadInfo) ||\n+ messageInfo.type === messageTypes.TEXT &&\n+ (threadIsGroupChat(threadInfo) ||\nthreadInfo.name !== '' ||\n- messageInfo.creator.isViewer\n+ messageInfo.creator.isViewer)\n) {\nconst userString = stringForUser(messageInfo.creator);\n- const username = `${userString}: `;\n- usernameText = <span className={colorStyle}>{username}</span>;\n+ usernameText = <span className={colorStyle}>{`${userString}: `}</span>;\n}\n+\nreturn (\n<div className={classNames(css.lastMessage, colorStyle)}>\n{usernameText}\n{messageTitle}\n</div>\n);\n- } else {\n- return (\n- <div className={classNames(css.lastMessage, colorStyle)}>\n- {messageTitle}\n- </div>\n- );\n- }\n}\nexport default MessagePreview;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] simplify username logic in message preview Summary: simplify rendering logic for username in message preview Test Plan: username logic is the same as production. No new functionality Reviewers: atul, def-au1t, palys-swm, ashoat Reviewed By: ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3506
129,179
25.03.2022 13:59:22
14,400
cf4fd35e30c523d22974dac976a90bdbbf0c9043
[web] [refactor] move hasUsername logic to variable Summary: move logic to variable thats descriptive of what it checks for {F25114} {F25115} Test Plan: no new added functionality, username should render as normal Reviewers: atul, palys-swm, def-au1t, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/chat/message-preview.react.js", "new_path": "web/chat/message-preview.react.js", "diff": "@@ -49,13 +49,13 @@ function MessagePreview(props: Props): React.Node {\ngetDefaultTextMessageRules().simpleMarkdownRules,\n);\n- let usernameText = null;\n- if (\n- messageInfo.type === messageTypes.TEXT &&\n- (threadIsGroupChat(threadInfo) ||\n+ const hasUsername =\n+ threadIsGroupChat(threadInfo) ||\nthreadInfo.name !== '' ||\n- messageInfo.creator.isViewer)\n- ) {\n+ messageInfo.creator.isViewer;\n+\n+ let usernameText = null;\n+ if (messageInfo.type === messageTypes.TEXT && hasUsername) {\nconst userString = stringForUser(messageInfo.creator);\nusernameText = <span className={colorStyle}>{`${userString}: `}</span>;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] move hasUsername logic to variable Summary: move logic to variable thats descriptive of what it checks for {F25114} {F25115} Test Plan: no new added functionality, username should render as normal Reviewers: atul, palys-swm, def-au1t, ashoat Reviewed By: ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3508
129,190
21.03.2022 09:55:06
-3,600
92c1f81fc0e5ef67c2df4cea95dffe1916ff2282
[services] Backup - Update proto file Summary: We want to remove authentication from the backup service Test Plan: None, it's just a change in the proto file. Reviewers: palys-swm, varun, jimpo, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/grpc/_generated/backup.pb.cc", "new_path": "native/cpp/CommonCpp/grpc/_generated/backup.pb.cc", "diff": "@@ -301,6 +301,7 @@ const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_backup_2eproto::offsets[] PROT\n::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,\n::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,\n::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,\n+ ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,\nPROTOBUF_FIELD_OFFSET(::backup::CreateNewBackupRequest, data_),\n~0u, // no _has_bits_\nPROTOBUF_FIELD_OFFSET(::backup::CreateNewBackupResponse, _internal_metadata_),\n@@ -359,12 +360,12 @@ static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOB\n{ 58, -1, sizeof(::backup::SimpleAuthenticationRequestData)},\n{ 65, -1, sizeof(::backup::BackupKeyEntropy)},\n{ 73, -1, sizeof(::backup::CreateNewBackupRequest)},\n- { 82, -1, sizeof(::backup::CreateNewBackupResponse)},\n- { 91, -1, sizeof(::backup::SendLogRequest)},\n- { 98, -1, sizeof(::backup::RecoverBackupKeyRequest)},\n- { 104, -1, sizeof(::backup::RecoverBackupKeyResponse)},\n- { 113, -1, sizeof(::backup::PullBackupRequest)},\n- { 119, -1, sizeof(::backup::PullBackupResponse)},\n+ { 83, -1, sizeof(::backup::CreateNewBackupResponse)},\n+ { 92, -1, sizeof(::backup::SendLogRequest)},\n+ { 99, -1, sizeof(::backup::RecoverBackupKeyRequest)},\n+ { 105, -1, sizeof(::backup::RecoverBackupKeyResponse)},\n+ { 114, -1, sizeof(::backup::PullBackupRequest)},\n+ { 120, -1, sizeof(::backup::PullBackupResponse)},\n};\nstatic ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {\n@@ -418,46 +419,46 @@ const char descriptor_table_protodef_backup_2eproto[] PROTOBUF_SECTION_VARIABLE(\n\"DataH\\000B\\006\\n\\004data\\\"C\\n\\037SimpleAuthenticationRe\"\n\"questData\\022\\020\\n\\010backupID\\030\\001 \\001(\\t\\022\\016\\n\\006userID\\030\\002 \"\n\"\\001(\\t\\\"A\\n\\020BackupKeyEntropy\\022\\017\\n\\005nonce\\030\\001 \\001(\\014H\\000\"\n- \"\\022\\024\\n\\nrawMessage\\030\\002 \\001(\\014H\\000B\\006\\n\\004data\\\"\\300\\001\\n\\026Creat\"\n+ \"\\022\\024\\n\\nrawMessage\\030\\002 \\001(\\014H\\000B\\006\\n\\004data\\\"\\335\\001\\n\\026Creat\"\n\"eNewBackupRequest\\022J\\n\\031authenticationReque\"\n\"stData\\030\\001 \\001(\\0132%.backup.FullAuthentication\"\n\"RequestDataH\\000\\0224\\n\\020backupKeyEntropy\\030\\002 \\001(\\0132\"\n- \"\\030.backup.BackupKeyEntropyH\\000\\022\\034\\n\\022newCompac\"\n- \"tionChunk\\030\\003 \\001(\\014H\\000B\\006\\n\\004data\\\"\\233\\001\\n\\027CreateNewB\"\n- \"ackupResponse\\022L\\n\\032authenticationResponseD\"\n- \"ata\\030\\001 \\001(\\0132&.backup.FullAuthenticationRes\"\n- \"ponseDataH\\000\\022\\026\\n\\014entropyValid\\030\\002 \\001(\\010H\\000\\022\\022\\n\\010b\"\n- \"ackupID\\030\\003 \\001(\\tH\\000B\\006\\n\\004data\\\"f\\n\\016SendLogReques\"\n- \"t\\022C\\n\\022authenticationData\\030\\001 \\001(\\0132\\'.backup.S\"\n- \"impleAuthenticationRequestData\\022\\017\\n\\007logDat\"\n- \"a\\030\\002 \\001(\\014\\\"\\\\\\n\\027RecoverBackupKeyRequest\\022A\\n\\022au\"\n- \"thenticationData\\030\\001 \\001(\\0132%.backup.FullAuth\"\n- \"enticationRequestData\\\"\\272\\001\\n\\030RecoverBackupK\"\n- \"eyResponse\\022L\\n\\032authenticationResponseData\"\n- \"\\030\\001 \\001(\\0132&.backup.FullAuthenticationRespon\"\n- \"seDataH\\000\\0224\\n\\020backupKeyEntropy\\030\\002 \\001(\\0132\\030.bac\"\n- \"kup.BackupKeyEntropyH\\000\\022\\022\\n\\010backupID\\030\\004 \\001(\\t\"\n- \"H\\000B\\006\\n\\004data\\\"X\\n\\021PullBackupRequest\\022C\\n\\022authe\"\n- \"nticationData\\030\\001 \\001(\\0132\\'.backup.SimpleAuthe\"\n- \"nticationRequestData\\\"K\\n\\022PullBackupRespon\"\n- \"se\\022\\031\\n\\017compactionChunk\\030\\001 \\001(\\014H\\000\\022\\022\\n\\010logChun\"\n- \"k\\030\\002 \\001(\\014H\\000B\\006\\n\\004data2\\320\\002\\n\\rBackupService\\022X\\n\\017C\"\n- \"reateNewBackup\\022\\036.backup.CreateNewBackupR\"\n- \"equest\\032\\037.backup.CreateNewBackupResponse\\\"\"\n- \"\\000(\\0010\\001\\022=\\n\\007SendLog\\022\\026.backup.SendLogRequest\"\n- \"\\032\\026.google.protobuf.Empty\\\"\\000(\\001\\022[\\n\\020RecoverB\"\n- \"ackupKey\\022\\037.backup.RecoverBackupKeyReques\"\n- \"t\\032 .backup.RecoverBackupKeyResponse\\\"\\000(\\0010\"\n- \"\\001\\022I\\n\\nPullBackup\\022\\031.backup.PullBackupReque\"\n- \"st\\032\\032.backup.PullBackupResponse\\\"\\000(\\0010\\001b\\006pr\"\n- \"oto3\"\n+ \"\\030.backup.BackupKeyEntropyH\\000\\022\\033\\n\\021newCompac\"\n+ \"tionHash\\030\\003 \\001(\\014H\\000\\022\\034\\n\\022newCompactionChunk\\030\\004\"\n+ \" \\001(\\014H\\000B\\006\\n\\004data\\\"\\233\\001\\n\\027CreateNewBackupRespon\"\n+ \"se\\022L\\n\\032authenticationResponseData\\030\\001 \\001(\\0132&\"\n+ \".backup.FullAuthenticationResponseDataH\\000\"\n+ \"\\022\\026\\n\\014entropyValid\\030\\002 \\001(\\010H\\000\\022\\022\\n\\010backupID\\030\\003 \\001\"\n+ \"(\\tH\\000B\\006\\n\\004data\\\"f\\n\\016SendLogRequest\\022C\\n\\022authen\"\n+ \"ticationData\\030\\001 \\001(\\0132\\'.backup.SimpleAuthen\"\n+ \"ticationRequestData\\022\\017\\n\\007logData\\030\\002 \\001(\\014\\\"\\\\\\n\\027\"\n+ \"RecoverBackupKeyRequest\\022A\\n\\022authenticatio\"\n+ \"nData\\030\\001 \\001(\\0132%.backup.FullAuthenticationR\"\n+ \"equestData\\\"\\272\\001\\n\\030RecoverBackupKeyResponse\\022\"\n+ \"L\\n\\032authenticationResponseData\\030\\001 \\001(\\0132&.ba\"\n+ \"ckup.FullAuthenticationResponseDataH\\000\\0224\\n\"\n+ \"\\020backupKeyEntropy\\030\\002 \\001(\\0132\\030.backup.BackupK\"\n+ \"eyEntropyH\\000\\022\\022\\n\\010backupID\\030\\004 \\001(\\tH\\000B\\006\\n\\004data\\\"\"\n+ \"X\\n\\021PullBackupRequest\\022C\\n\\022authenticationDa\"\n+ \"ta\\030\\001 \\001(\\0132\\'.backup.SimpleAuthenticationRe\"\n+ \"questData\\\"K\\n\\022PullBackupResponse\\022\\031\\n\\017compa\"\n+ \"ctionChunk\\030\\001 \\001(\\014H\\000\\022\\022\\n\\010logChunk\\030\\002 \\001(\\014H\\000B\\006\"\n+ \"\\n\\004data2\\320\\002\\n\\rBackupService\\022X\\n\\017CreateNewBac\"\n+ \"kup\\022\\036.backup.CreateNewBackupRequest\\032\\037.ba\"\n+ \"ckup.CreateNewBackupResponse\\\"\\000(\\0010\\001\\022=\\n\\007Se\"\n+ \"ndLog\\022\\026.backup.SendLogRequest\\032\\026.google.p\"\n+ \"rotobuf.Empty\\\"\\000(\\001\\022[\\n\\020RecoverBackupKey\\022\\037.\"\n+ \"backup.RecoverBackupKeyRequest\\032 .backup.\"\n+ \"RecoverBackupKeyResponse\\\"\\000(\\0010\\001\\022I\\n\\nPullBa\"\n+ \"ckup\\022\\031.backup.PullBackupRequest\\032\\032.backup\"\n+ \".PullBackupResponse\\\"\\000(\\0010\\001b\\006proto3\"\n;\nstatic const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_backup_2eproto_deps[1] = {\n&::descriptor_table_google_2fprotobuf_2fempty_2eproto,\n};\nstatic ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_backup_2eproto_once;\nconst ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_backup_2eproto = {\n- false, false, 2524, descriptor_table_protodef_backup_2eproto, \"backup.proto\",\n+ false, false, 2553, descriptor_table_protodef_backup_2eproto, \"backup.proto\",\n&descriptor_table_backup_2eproto_once, descriptor_table_backup_2eproto_deps, 1, 16,\nschemas, file_default_instances, TableStruct_backup_2eproto::offsets,\nfile_level_metadata_backup_2eproto, file_level_enum_descriptors_backup_2eproto, file_level_service_descriptors_backup_2eproto,\n@@ -3053,6 +3054,10 @@ CreateNewBackupRequest::CreateNewBackupRequest(const CreateNewBackupRequest& fro\n_internal_mutable_backupkeyentropy()->::backup::BackupKeyEntropy::MergeFrom(from._internal_backupkeyentropy());\nbreak;\n}\n+ case kNewCompactionHash: {\n+ _internal_set_newcompactionhash(from._internal_newcompactionhash());\n+ break;\n+ }\ncase kNewCompactionChunk: {\n_internal_set_newcompactionchunk(from._internal_newcompactionchunk());\nbreak;\n@@ -3106,6 +3111,10 @@ void CreateNewBackupRequest::clear_data() {\n}\nbreak;\n}\n+ case kNewCompactionHash: {\n+ data_.newcompactionhash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());\n+ break;\n+ }\ncase kNewCompactionChunk: {\ndata_.newcompactionchunk_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());\nbreak;\n@@ -3149,9 +3158,17 @@ const char* CreateNewBackupRequest::_InternalParse(const char* ptr, ::PROTOBUF_N\nCHK_(ptr);\n} else goto handle_unusual;\ncontinue;\n- // bytes newCompactionChunk = 3;\n+ // bytes newCompactionHash = 3;\ncase 3:\nif (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {\n+ auto str = _internal_mutable_newcompactionhash();\n+ ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);\n+ CHK_(ptr);\n+ } else goto handle_unusual;\n+ continue;\n+ // bytes newCompactionChunk = 4;\n+ case 4:\n+ if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {\nauto str = _internal_mutable_newcompactionchunk();\nptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);\nCHK_(ptr);\n@@ -3201,10 +3218,16 @@ failure:\n2, _Internal::backupkeyentropy(this), target, stream);\n}\n- // bytes newCompactionChunk = 3;\n+ // bytes newCompactionHash = 3;\n+ if (_internal_has_newcompactionhash()) {\n+ target = stream->WriteBytesMaybeAliased(\n+ 3, this->_internal_newcompactionhash(), target);\n+ }\n+\n+ // bytes newCompactionChunk = 4;\nif (_internal_has_newcompactionchunk()) {\ntarget = stream->WriteBytesMaybeAliased(\n- 3, this->_internal_newcompactionchunk(), target);\n+ 4, this->_internal_newcompactionchunk(), target);\n}\nif (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {\n@@ -3238,7 +3261,14 @@ size_t CreateNewBackupRequest::ByteSizeLong() const {\n*data_.backupkeyentropy_);\nbreak;\n}\n- // bytes newCompactionChunk = 3;\n+ // bytes newCompactionHash = 3;\n+ case kNewCompactionHash: {\n+ total_size += 1 +\n+ ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(\n+ this->_internal_newcompactionhash());\n+ break;\n+ }\n+ // bytes newCompactionChunk = 4;\ncase kNewCompactionChunk: {\ntotal_size += 1 +\n::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(\n@@ -3289,6 +3319,10 @@ void CreateNewBackupRequest::MergeFrom(const CreateNewBackupRequest& from) {\n_internal_mutable_backupkeyentropy()->::backup::BackupKeyEntropy::MergeFrom(from._internal_backupkeyentropy());\nbreak;\n}\n+ case kNewCompactionHash: {\n+ _internal_set_newcompactionhash(from._internal_newcompactionhash());\n+ break;\n+ }\ncase kNewCompactionChunk: {\n_internal_set_newcompactionchunk(from._internal_newcompactionchunk());\nbreak;\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/grpc/_generated/backup.pb.h", "new_path": "native/cpp/CommonCpp/grpc/_generated/backup.pb.h", "diff": "@@ -1857,7 +1857,8 @@ class CreateNewBackupRequest PROTOBUF_FINAL :\nenum DataCase {\nkAuthenticationRequestData = 1,\nkBackupKeyEntropy = 2,\n- kNewCompactionChunk = 3,\n+ kNewCompactionHash = 3,\n+ kNewCompactionChunk = 4,\nDATA_NOT_SET = 0,\n};\n@@ -1938,7 +1939,8 @@ class CreateNewBackupRequest PROTOBUF_FINAL :\nenum : int {\nkAuthenticationRequestDataFieldNumber = 1,\nkBackupKeyEntropyFieldNumber = 2,\n- kNewCompactionChunkFieldNumber = 3,\n+ kNewCompactionHashFieldNumber = 3,\n+ kNewCompactionChunkFieldNumber = 4,\n};\n// .backup.FullAuthenticationRequestData authenticationRequestData = 1;\nbool has_authenticationrequestdata() const;\n@@ -1976,7 +1978,27 @@ class CreateNewBackupRequest PROTOBUF_FINAL :\n::backup::BackupKeyEntropy* backupkeyentropy);\n::backup::BackupKeyEntropy* unsafe_arena_release_backupkeyentropy();\n- // bytes newCompactionChunk = 3;\n+ // bytes newCompactionHash = 3;\n+ bool has_newcompactionhash() const;\n+ private:\n+ bool _internal_has_newcompactionhash() const;\n+ public:\n+ void clear_newcompactionhash();\n+ const std::string& newcompactionhash() const;\n+ void set_newcompactionhash(const std::string& value);\n+ void set_newcompactionhash(std::string&& value);\n+ void set_newcompactionhash(const char* value);\n+ void set_newcompactionhash(const void* value, size_t size);\n+ std::string* mutable_newcompactionhash();\n+ std::string* release_newcompactionhash();\n+ void set_allocated_newcompactionhash(std::string* newcompactionhash);\n+ private:\n+ const std::string& _internal_newcompactionhash() const;\n+ void _internal_set_newcompactionhash(const std::string& value);\n+ std::string* _internal_mutable_newcompactionhash();\n+ public:\n+\n+ // bytes newCompactionChunk = 4;\nbool has_newcompactionchunk() const;\nprivate:\nbool _internal_has_newcompactionchunk() const;\n@@ -2003,6 +2025,7 @@ class CreateNewBackupRequest PROTOBUF_FINAL :\nclass _Internal;\nvoid set_has_authenticationrequestdata();\nvoid set_has_backupkeyentropy();\n+ void set_has_newcompactionhash();\nvoid set_has_newcompactionchunk();\ninline bool has_data() const;\n@@ -2016,6 +2039,7 @@ class CreateNewBackupRequest PROTOBUF_FINAL :\n::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_;\n::backup::FullAuthenticationRequestData* authenticationrequestdata_;\n::backup::BackupKeyEntropy* backupkeyentropy_;\n+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr newcompactionhash_;\n::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr newcompactionchunk_;\n} data_;\nmutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;\n@@ -5159,7 +5183,117 @@ inline ::backup::BackupKeyEntropy* CreateNewBackupRequest::mutable_backupkeyentr\nreturn _internal_mutable_backupkeyentropy();\n}\n-// bytes newCompactionChunk = 3;\n+// bytes newCompactionHash = 3;\n+inline bool CreateNewBackupRequest::_internal_has_newcompactionhash() const {\n+ return data_case() == kNewCompactionHash;\n+}\n+inline bool CreateNewBackupRequest::has_newcompactionhash() const {\n+ return _internal_has_newcompactionhash();\n+}\n+inline void CreateNewBackupRequest::set_has_newcompactionhash() {\n+ _oneof_case_[0] = kNewCompactionHash;\n+}\n+inline void CreateNewBackupRequest::clear_newcompactionhash() {\n+ if (_internal_has_newcompactionhash()) {\n+ data_.newcompactionhash_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());\n+ clear_has_data();\n+ }\n+}\n+inline const std::string& CreateNewBackupRequest::newcompactionhash() const {\n+ // @@protoc_insertion_point(field_get:backup.CreateNewBackupRequest.newCompactionHash)\n+ return _internal_newcompactionhash();\n+}\n+inline void CreateNewBackupRequest::set_newcompactionhash(const std::string& value) {\n+ _internal_set_newcompactionhash(value);\n+ // @@protoc_insertion_point(field_set:backup.CreateNewBackupRequest.newCompactionHash)\n+}\n+inline std::string* CreateNewBackupRequest::mutable_newcompactionhash() {\n+ // @@protoc_insertion_point(field_mutable:backup.CreateNewBackupRequest.newCompactionHash)\n+ return _internal_mutable_newcompactionhash();\n+}\n+inline const std::string& CreateNewBackupRequest::_internal_newcompactionhash() const {\n+ if (_internal_has_newcompactionhash()) {\n+ return data_.newcompactionhash_.Get();\n+ }\n+ return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited();\n+}\n+inline void CreateNewBackupRequest::_internal_set_newcompactionhash(const std::string& value) {\n+ if (!_internal_has_newcompactionhash()) {\n+ clear_data();\n+ set_has_newcompactionhash();\n+ data_.newcompactionhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());\n+ }\n+ data_.newcompactionhash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArena());\n+}\n+inline void CreateNewBackupRequest::set_newcompactionhash(std::string&& value) {\n+ // @@protoc_insertion_point(field_set:backup.CreateNewBackupRequest.newCompactionHash)\n+ if (!_internal_has_newcompactionhash()) {\n+ clear_data();\n+ set_has_newcompactionhash();\n+ data_.newcompactionhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());\n+ }\n+ data_.newcompactionhash_.Set(\n+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::move(value), GetArena());\n+ // @@protoc_insertion_point(field_set_rvalue:backup.CreateNewBackupRequest.newCompactionHash)\n+}\n+inline void CreateNewBackupRequest::set_newcompactionhash(const char* value) {\n+ GOOGLE_DCHECK(value != nullptr);\n+ if (!_internal_has_newcompactionhash()) {\n+ clear_data();\n+ set_has_newcompactionhash();\n+ data_.newcompactionhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());\n+ }\n+ data_.newcompactionhash_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{},\n+ ::std::string(value), GetArena());\n+ // @@protoc_insertion_point(field_set_char:backup.CreateNewBackupRequest.newCompactionHash)\n+}\n+inline void CreateNewBackupRequest::set_newcompactionhash(const void* value,\n+ size_t size) {\n+ if (!_internal_has_newcompactionhash()) {\n+ clear_data();\n+ set_has_newcompactionhash();\n+ data_.newcompactionhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());\n+ }\n+ data_.newcompactionhash_.Set(\n+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, ::std::string(\n+ reinterpret_cast<const char*>(value), size),\n+ GetArena());\n+ // @@protoc_insertion_point(field_set_pointer:backup.CreateNewBackupRequest.newCompactionHash)\n+}\n+inline std::string* CreateNewBackupRequest::_internal_mutable_newcompactionhash() {\n+ if (!_internal_has_newcompactionhash()) {\n+ clear_data();\n+ set_has_newcompactionhash();\n+ data_.newcompactionhash_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());\n+ }\n+ return data_.newcompactionhash_.Mutable(\n+ ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArena());\n+}\n+inline std::string* CreateNewBackupRequest::release_newcompactionhash() {\n+ // @@protoc_insertion_point(field_release:backup.CreateNewBackupRequest.newCompactionHash)\n+ if (_internal_has_newcompactionhash()) {\n+ clear_has_data();\n+ return data_.newcompactionhash_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());\n+ } else {\n+ return nullptr;\n+ }\n+}\n+inline void CreateNewBackupRequest::set_allocated_newcompactionhash(std::string* newcompactionhash) {\n+ if (has_data()) {\n+ clear_data();\n+ }\n+ if (newcompactionhash != nullptr) {\n+ set_has_newcompactionhash();\n+ data_.newcompactionhash_.UnsafeSetDefault(newcompactionhash);\n+ ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena();\n+ if (arena != nullptr) {\n+ arena->Own(newcompactionhash);\n+ }\n+ }\n+ // @@protoc_insertion_point(field_set_allocated:backup.CreateNewBackupRequest.newCompactionHash)\n+}\n+\n+// bytes newCompactionChunk = 4;\ninline bool CreateNewBackupRequest::_internal_has_newcompactionchunk() const {\nreturn data_case() == kNewCompactionChunk;\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/grpc/protos/backup.proto", "new_path": "native/cpp/CommonCpp/grpc/protos/backup.proto", "diff": "@@ -25,103 +25,34 @@ service BackupService {\nrpc PullBackup(stream PullBackupRequest) returns (stream PullBackupResponse) {}\n}\n-// Helper types\n-\n-message PakeRegistrationRequestAndUserID {\n- string userID = 1;\n- bytes pakeRegistrationRequest = 2;\n-}\n-\n-message PakeAuthenticationRequestData {\n- oneof data {\n- PakeRegistrationRequestAndUserID pakeRegistrationRequestAndUserID = 1;\n- bytes pakeRegistrationUpload = 2;\n- bytes pakeCredentialRequest = 3;\n- bytes pakeCredentialFinalization = 4;\n- bytes pakeClientMAC = 5;\n- }\n-}\n-\n-message WalletAuthenticationRequestData {\n- string userID = 1;\n- string walletAddress = 2;\n- bytes signedMessage = 3;\n-}\n-\n-message FullAuthenticationRequestData {\n- oneof data {\n- PakeAuthenticationRequestData pakeAuthenticationRequestData = 1;\n- WalletAuthenticationRequestData walletAuthenticationRequestData = 2;\n- }\n-}\n-\n-message WalletAuthenticationResponseData {\n- bool success = 1;\n-}\n-\n-message PakeAuthenticationResponseData {\n- oneof data {\n- bytes pakeRegistrationResponse = 1;\n- bool pakeRegistrationSuccess = 2;\n- bytes pakeCredentialResponse = 3;\n- bytes pakeServerMAC = 4;\n- }\n-}\n-\n-message FullAuthenticationResponseData {\n- oneof data {\n- PakeAuthenticationResponseData pakeAuthenticationResponseData = 1;\n- WalletAuthenticationResponseData walletAuthenticationResponseData = 2;\n- }\n-}\n-\n-message SimpleAuthenticationRequestData {\n- string backupID = 1;\n- string userID = 2;\n-}\n-\n-message BackupKeyEntropy {\n- oneof data {\n- bytes nonce = 1;\n- bytes rawMessage = 2;\n- }\n-}\n-\n// CreateNewBackup\nmessage CreateNewBackupRequest {\noneof data {\n- FullAuthenticationRequestData authenticationRequestData = 1;\n- BackupKeyEntropy backupKeyEntropy = 2;\n+ bytes keyEntropy = 1;\n+ bytes newCompactionHash = 2;\nbytes newCompactionChunk = 3;\n}\n}\nmessage CreateNewBackupResponse {\n- oneof data {\n- FullAuthenticationResponseData authenticationResponseData = 1;\n- bool entropyValid = 2;\n- string backupID = 3;\n- }\n+ string backupID = 1;\n}\n// SendLog\nmessage SendLogRequest {\n- SimpleAuthenticationRequestData authenticationData = 1;\n- bytes logData = 2;\n+ bytes logData = 1;\n}\n// RecoverBackupKey\nmessage RecoverBackupKeyRequest {\n- FullAuthenticationRequestData authenticationData = 1;\n+ string userID = 1;\n}\nmessage RecoverBackupKeyResponse {\noneof data {\n- FullAuthenticationResponseData authenticationResponseData = 1;\n- BackupKeyEntropy backupKeyEntropy = 2;\nstring backupID = 4;\n}\n}\n@@ -129,7 +60,7 @@ message RecoverBackupKeyResponse {\n// PullBackup\nmessage PullBackupRequest {\n- SimpleAuthenticationRequestData authenticationData = 1;\n+ string userID = 1;\n}\nmessage PullBackupResponse {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Update proto file Summary: We want to remove authentication from the backup service Test Plan: None, it's just a change in the proto file. Reviewers: palys-swm, varun, jimpo, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3461
129,191
18.03.2022 14:19:37
-3,600
7d9fa21308344ae6551d4b163fadd3cfe8aada64
[web] Directly render code that is no longer conditional Summary: Simplify the code by directly rendering instead of first assigning to a variable {F24416} {F24417} {F24418} Depends on D3473 Test Plan: Flow Reviewers: benschac, atul, def-au1t Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/settings/password-change-modal.js", "new_path": "web/settings/password-change-modal.js", "diff": "@@ -65,8 +65,18 @@ class PasswordChangeModal extends React.PureComponent<Props, State> {\n}\nrender() {\n+ let errorMsg;\n+ if (this.state.errorMessage) {\n+ errorMsg = (\n+ <div className={css['modal-form-error']}>{this.state.errorMessage}</div>\n+ );\n+ }\n+\nconst { inputDisabled } = this.props;\n- const mainContent = (\n+ return (\n+ <Modal name=\"Edit account\" onClose={this.props.clearModal} size=\"large\">\n+ <div className={css['modal-body']}>\n+ <form method=\"POST\">\n<div>\n<div className={css['form-text']}>\n<div className={css['form-title']}>Username</div>\n@@ -96,32 +106,6 @@ class PasswordChangeModal extends React.PureComponent<Props, State> {\n</div>\n</div>\n</div>\n- </div>\n- );\n-\n- const buttons = (\n- <Button\n- type=\"submit\"\n- variant=\"primary\"\n- onClick={this.onSubmit}\n- disabled={inputDisabled}\n- >\n- Update Account\n- </Button>\n- );\n-\n- let errorMsg;\n- if (this.state.errorMessage) {\n- errorMsg = (\n- <div className={css['modal-form-error']}>{this.state.errorMessage}</div>\n- );\n- }\n-\n- return (\n- <Modal name=\"Edit account\" onClose={this.props.clearModal} size=\"large\">\n- <div className={css['modal-body']}>\n- <form method=\"POST\">\n- {mainContent}\n<div className={css['user-settings-current-password']}>\n<p className={css['confirm-account-password']}>\nPlease enter your current password to confirm your identity\n@@ -139,9 +123,17 @@ class PasswordChangeModal extends React.PureComponent<Props, State> {\n</div>\n</div>\n<div className={css['form-footer']}>\n- {buttons}\n+ <Button\n+ type=\"submit\"\n+ variant=\"primary\"\n+ onClick={this.onSubmit}\n+ disabled={inputDisabled}\n+ >\n+ Update Account\n+ </Button>\n{errorMsg}\n</div>\n+ </div>\n</form>\n</div>\n</Modal>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Directly render code that is no longer conditional Summary: Simplify the code by directly rendering instead of first assigning to a variable {F24416} {F24417} {F24418} Depends on D3473 Test Plan: Flow Reviewers: benschac, atul, def-au1t Reviewed By: benschac, atul Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3474
129,191
18.03.2022 14:22:44
-3,600
1ab0d664e919bc270684bcc9e09bc45d29b3efb0
[web] Update password modal copy Summary: Update the text that is displayed. {F24324} Depends on D3474 Test Plan: Flow Reviewers: benschac, atul, def-au1t Subscribers: ashoat, Adrian, karol-bisztyga
[ { "change_type": "MODIFY", "old_path": "web/settings/password-change-modal.js", "new_path": "web/settings/password-change-modal.js", "diff": "@@ -74,7 +74,11 @@ class PasswordChangeModal extends React.PureComponent<Props, State> {\nconst { inputDisabled } = this.props;\nreturn (\n- <Modal name=\"Edit account\" onClose={this.props.clearModal} size=\"large\">\n+ <Modal\n+ name=\"Change Password\"\n+ onClose={this.props.clearModal}\n+ size=\"large\"\n+ >\n<div className={css['modal-body']}>\n<form method=\"POST\">\n<div>\n@@ -129,7 +133,7 @@ class PasswordChangeModal extends React.PureComponent<Props, State> {\nonClick={this.onSubmit}\ndisabled={inputDisabled}\n>\n- Update Account\n+ Change Password\n</Button>\n{errorMsg}\n</div>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Update password modal copy Summary: Update the text that is displayed. {F24324} Depends on D3474 Test Plan: Flow Reviewers: benschac, atul, def-au1t Reviewed By: benschac, atul Subscribers: ashoat, Adrian, karol-bisztyga Differential Revision: https://phabricator.ashoat.com/D3475
129,190
29.03.2022 13:30:23
-7,200
489a50d1db4cb1c6835eb9c30ed71997b7c4297d
[services] Backup - Add comments to the db entities Summary: Context Some comments to clarify things around DB entities. Test Plan: None - these are just comments Reviewers: varun, geekbrother, jimpo, palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/BackupItem.h", "new_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/BackupItem.h", "diff": "@@ -10,6 +10,17 @@ namespace network {\nnamespace database {\n/**\n+ * backup - backups assigned to users along with the data necessary to\n+ * decrypt\n+ * `created` - when the backup was created. This is a search key because\n+ * we want to be able to perform effective queries based on this info\n+ * (for example get me the latest backup, get me backup from some day)\n+ * `attachmentHolders` - this is a list of attachment references\n+ * `recoveryData` - data serialized with protobuf which is described by\n+ * one of the following structures:\n+ * { authType: 'password', pakePasswordCiphertext: string, nonce: string }\n+ * { authType: 'wallet', walletAddress: string, rawMessage: string }\n+ *\n* this class is used for representing two things: the rows in the main table,\n* and also the rows in the secondary index\n*\n" }, { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.h", "new_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.h", "diff": "@@ -9,6 +9,14 @@ namespace comm {\nnamespace network {\nnamespace database {\n+/*\n+ * log - a single log record\n+ * `backupID` - id of the backup that this log is assigned to\n+ * `value` - either the value itself which is a dump of a single operation (if\n+ * `persistedInBlob` is false) or the holder to blob (if `persistedInBlob` is\n+ * true)\n+ * `attachmentHolders` - this is a list of attachment references\n+ */\nclass LogItem : public Item {\nstd::string backupID;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add comments to the db entities Summary: Context - https://phabricator.ashoat.com/D2950#93128 Some comments to clarify things around DB entities. Test Plan: None - these are just comments Reviewers: varun, geekbrother, jimpo, palys-swm Reviewed By: varun, palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3489
129,187
30.03.2022 15:13:22
14,400
dcd0a2c4afbbae2bf3329229345bfb3c5a22ca9e
[server] Reorder Express routers Summary: The order of these matters - see code comment. Test Plan: I actually tested reordering these live on prod, and it worked Reviewers: varun Subscribers: palys-swm, Adrian, atul, karol-bisztyga, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "server/src/server.js", "new_path": "server/src/server.js", "diff": "@@ -125,13 +125,11 @@ if (cluster.isMaster) {\n);\n};\n- const squadCalRouter = express.Router();\n- setupAppRouter(squadCalRouter);\n- server.use(squadCalBaseRoutePath, squadCalRouter);\n-\n- const commAppRouter = express.Router();\n- setupAppRouter(commAppRouter);\n- server.use(commAppBaseRoutePath, commAppRouter);\n+ // Note - the order of router declarations matters. On prod we have\n+ // squadCalBaseRoutePath configured to '/', which means it's a catch-all. If\n+ // we call server.use on squadCalRouter first, it will catch all requests and\n+ // prevent commAppRouter and landingRouter from working correctly. So we make\n+ // sure that squadCalRouter goes last\nconst landingRouter = express.Router();\nlandingRouter.use('/images', express.static('images'));\n@@ -143,8 +141,15 @@ if (cluster.isMaster) {\nlandingRouter.use('/', express.static('landing_icons'));\nlandingRouter.post('/subscribe_email', emailSubscriptionResponder);\nlandingRouter.get('*', landingHandler);\n-\nserver.use(landingBaseRoutePath, landingRouter);\n+ const commAppRouter = express.Router();\n+ setupAppRouter(commAppRouter);\n+ server.use(commAppBaseRoutePath, commAppRouter);\n+\n+ const squadCalRouter = express.Router();\n+ setupAppRouter(squadCalRouter);\n+ server.use(squadCalBaseRoutePath, squadCalRouter);\n+\nserver.listen(parseInt(process.env.PORT, 10) || 3000, 'localhost');\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Reorder Express routers Summary: The order of these matters - see code comment. Test Plan: I actually tested reordering these live on prod, and it worked Reviewers: varun Reviewed By: varun Subscribers: palys-swm, Adrian, atul, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3572
129,179
30.03.2022 16:59:36
14,400
cca39d8b963b035bac2c4b22cdb82af9c32afba4
[native] [fix] update timestamp to lowercase Summary: {F27438} update timestamp to match web web: {F27439} Test Plan: open simulator, make sure the timestamp is lowercase Reviewers: atul, yayabosh, def-au1t, palys-swm, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "native/chat/timestamp.react.js", "new_path": "native/chat/timestamp.react.js", "diff": "@@ -19,11 +19,7 @@ function Timestamp(props: Props): React.Node {\nif (props.display === 'modal') {\nstyle.push(styles.modal);\n}\n- return (\n- <SingleLine style={style}>\n- {longAbsoluteDate(props.time).toUpperCase()}\n- </SingleLine>\n- );\n+ return <SingleLine style={style}>{longAbsoluteDate(props.time)}</SingleLine>;\n}\nconst timestampHeight = 26;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [fix] ENG-949 update timestamp to lowercase Summary: {F27438} update timestamp to match web web: {F27439} Test Plan: open simulator, make sure the timestamp is lowercase Reviewers: atul, yayabosh, def-au1t, palys-swm, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3576
129,190
31.03.2022 16:19:51
-7,200
52ef4052d7ab552f754fe3d8d67439804753f48f
[services] Backup - Add client reactor base classes - bidi reactor Summary: Depends on D3513 Adding client base classes for reactors - bidi reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, jimpo, varun, palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/client/base-reactors/ClientBidiReactorBase.h", "diff": "+#include <grpcpp/grpcpp.h>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+template <class Request, class Response>\n+class ClientBidiReactorBase\n+ : public grpc::ClientBidiReactor<Request, Response> {\n+ std::shared_ptr<Response> response = nullptr;\n+ bool done = false;\n+ bool initialized = 0;\n+\n+protected:\n+ Request request;\n+ grpc::Status status;\n+\n+public:\n+ grpc::ClientContext context;\n+\n+ void nextWrite();\n+ void terminate(const grpc::Status &status);\n+ bool isDone();\n+ void OnWriteDone(bool ok) override;\n+ void OnReadDone(bool ok) override;\n+ void OnDone(const grpc::Status &status) override;\n+\n+ virtual std::unique_ptr<grpc::Status> prepareRequest(\n+ Request &request,\n+ std::shared_ptr<Response> previousResponse) = 0;\n+ virtual void doneCallback() {\n+ }\n+};\n+\n+template <class Request, class Response>\n+void ClientBidiReactorBase<Request, Response>::nextWrite() {\n+ this->request = Request();\n+ std::unique_ptr<grpc::Status> status =\n+ this->prepareRequest(this->request, this->response);\n+ if (status != nullptr) {\n+ this->terminate(*status);\n+ return;\n+ }\n+ this->StartWrite(&this->request);\n+ if (!this->initialized) {\n+ this->StartCall();\n+ this->initialized = true;\n+ }\n+}\n+\n+template <class Request, class Response>\n+void ClientBidiReactorBase<Request, Response>::terminate(\n+ const grpc::Status &status) {\n+ if (this->done) {\n+ return;\n+ }\n+ this->StartWritesDone();\n+ this->status = status;\n+ this->done = true;\n+}\n+\n+template <class Request, class Response>\n+bool ClientBidiReactorBase<Request, Response>::isDone() {\n+ return this->done;\n+}\n+\n+template <class Request, class Response>\n+void ClientBidiReactorBase<Request, Response>::OnWriteDone(bool ok) {\n+ if (this->response == nullptr) {\n+ this->response = std::make_shared<Response>();\n+ }\n+ this->StartRead(&(*this->response));\n+}\n+\n+template <class Request, class Response>\n+void ClientBidiReactorBase<Request, Response>::OnReadDone(bool ok) {\n+ if (!ok) {\n+ this->terminate(grpc::Status(grpc::StatusCode::UNKNOWN, \"read error\"));\n+ return;\n+ }\n+ this->nextWrite();\n+}\n+\n+template <class Request, class Response>\n+void ClientBidiReactorBase<Request, Response>::OnDone(\n+ const grpc::Status &status) {\n+ this->terminate(status);\n+ this->doneCallback();\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add client reactor base classes - bidi reactor Summary: Depends on D3513 Adding client base classes for reactors - bidi reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, jimpo, varun, palys-swm Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3465
129,190
31.03.2022 16:19:54
-7,200
886ec256ac88c18993fd7dd1abfc08ccbf885b84
[services] Backup - Add client reactor base classes - read reactor Summary: Depends on D3465 Adding client base classes for reactors - read reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/client/base-reactors/ClientReadReactorBase.h", "diff": "+#include <grpcpp/grpcpp.h>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+template <class Request, class Response>\n+class ClientReadReactorBase : public grpc::ClientReadReactor<Response> {\n+ Response response;\n+ grpc::Status status;\n+ bool done = false;\n+ bool initialized = false;\n+\n+ void terminate(const grpc::Status &status);\n+\n+public:\n+ Request request;\n+ grpc::ClientContext context;\n+\n+ void start();\n+ void OnReadDone(bool ok) override;\n+ void OnDone(const grpc::Status &status) override;\n+ bool isDone();\n+\n+ virtual std::unique_ptr<grpc::Status>\n+ readResponse(const Response &response) = 0;\n+ virtual void doneCallback() {\n+ }\n+};\n+\n+template <class Request, class Response>\n+void ClientReadReactorBase<Request, Response>::terminate(\n+ const grpc::Status &status) {\n+ if (this->done) {\n+ return;\n+ }\n+ this->status = status;\n+ this->done = true;\n+ this->doneCallback();\n+}\n+\n+template <class Request, class Response>\n+void ClientReadReactorBase<Request, Response>::start() {\n+ this->StartRead(&this->response);\n+ if (!this->initialized) {\n+ this->StartCall();\n+ this->initialized = true;\n+ }\n+}\n+\n+template <class Request, class Response>\n+void ClientReadReactorBase<Request, Response>::OnReadDone(bool ok) {\n+ if (!ok) {\n+ this->terminate(grpc::Status(grpc::StatusCode::UNKNOWN, \"read error\"));\n+ return;\n+ }\n+ std::unique_ptr<grpc::Status> status = this->readResponse(this->response);\n+ if (status != nullptr) {\n+ this->terminate(*status);\n+ return;\n+ }\n+ this->StartRead(&this->response);\n+}\n+\n+template <class Request, class Response>\n+void ClientReadReactorBase<Request, Response>::OnDone(\n+ const grpc::Status &status) {\n+ this->terminate(status);\n+}\n+\n+template <class Request, class Response>\n+bool ClientReadReactorBase<Request, Response>::isDone() {\n+ return this->done;\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add client reactor base classes - read reactor Summary: Depends on D3465 Adding client base classes for reactors - read reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3514
129,190
31.03.2022 16:19:56
-7,200
3ffc1665dda6f86a3bdb700974de22c60c24e025
[services] Backup - Add client reactor base classes - write reactor Summary: Depends on D3514 Adding client base classes for reactors - write reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: jimpo, geekbrother, palys-swm, varun Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/client/base-reactors/ClientWriteReactorBase.h", "diff": "+#include <grpcpp/grpcpp.h>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+template <class Request, class Response>\n+class ClientWriteReactorBase : public grpc::ClientWriteReactor<Request> {\n+ grpc::Status status;\n+ bool done = false;\n+ bool initialized = 0;\n+ Request request;\n+\n+public:\n+ Response response;\n+ grpc::ClientContext context;\n+\n+ void nextWrite();\n+ void OnWriteDone(bool ok) override;\n+ void terminate(const grpc::Status &status);\n+ bool isDone();\n+ void OnDone(const grpc::Status &status) override;\n+\n+ virtual std::unique_ptr<grpc::Status> prepareRequest(Request &request) = 0;\n+ virtual void doneCallback() {\n+ }\n+};\n+\n+template <class Request, class Response>\n+void ClientWriteReactorBase<Request, Response>::nextWrite() {\n+ this->request = Request();\n+ std::unique_ptr<grpc::Status> status = this->prepareRequest(this->request);\n+ if (status != nullptr) {\n+ this->terminate(*status);\n+ return;\n+ }\n+ this->StartWrite(&this->request);\n+ if (!this->initialized) {\n+ this->StartCall();\n+ this->initialized = true;\n+ }\n+}\n+\n+template <class Request, class Response>\n+void ClientWriteReactorBase<Request, Response>::OnWriteDone(bool ok) {\n+ if (!ok) {\n+ this->terminate(grpc::Status(grpc::StatusCode::UNKNOWN, \"write error\"));\n+ return;\n+ }\n+ this->nextWrite();\n+}\n+\n+template <class Request, class Response>\n+void ClientWriteReactorBase<Request, Response>::terminate(\n+ const grpc::Status &status) {\n+ if (this->done) {\n+ return;\n+ }\n+ this->status = status;\n+ this->done = true;\n+ this->StartWritesDone();\n+ this->doneCallback();\n+}\n+\n+template <class Request, class Response>\n+bool ClientWriteReactorBase<Request, Response>::isDone() {\n+ return this->done;\n+}\n+\n+template <class Request, class Response>\n+void ClientWriteReactorBase<Request, Response>::OnDone(\n+ const grpc::Status &status) {\n+ this->terminate(status);\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add client reactor base classes - write reactor Summary: Depends on D3514 Adding client base classes for reactors - write reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: jimpo, geekbrother, palys-swm, varun Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3515
129,190
31.03.2022 16:19:59
-7,200
3d75f07ca0c529a3553f75c714fb62fb583abd22
[services] Backup - Add blob client Summary: Depends on D3515 Adding blob client to the backup service Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/client/blob/BlobPutClientReactor.h", "diff": "+#pragma once\n+\n+#include \"ClientBidiReactorBase.h\"\n+#include \"Constants.h\"\n+\n+#include \"../_generated/blob.grpc.pb.h\"\n+#include \"../_generated/blob.pb.h\"\n+\n+#include <folly/MPMCQueue.h>\n+#include <grpcpp/grpcpp.h>\n+\n+#include <iostream>\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+class BlobPutClientReactor\n+ : public ClientBidiReactorBase<blob::PutRequest, blob::PutResponse> {\n+\n+ enum class State {\n+ SEND_HOLDER = 0,\n+ SEND_HASH = 1,\n+ SEND_CHUNKS = 2,\n+ };\n+\n+ State state = State::SEND_HOLDER;\n+ const std::string hash;\n+ const std::string holder;\n+ size_t currentDataSize = 0;\n+ const size_t chunkSize =\n+ GRPC_CHUNK_SIZE_LIMIT - GRPC_METADATA_SIZE_PER_MESSAGE;\n+ folly::MPMCQueue<std::string> dataChunks;\n+\n+public:\n+ BlobPutClientReactor(const std::string &holder, const std::string &hash);\n+ void scheduleSendingDataChunk(const std::string &dataChunk);\n+ std::unique_ptr<grpc::Status> prepareRequest(\n+ blob::PutRequest &request,\n+ std::shared_ptr<blob::PutResponse> previousResponse) override;\n+};\n+\n+BlobPutClientReactor::BlobPutClientReactor(\n+ const std::string &holder,\n+ const std::string &hash)\n+ : holder(holder),\n+ hash(hash),\n+ dataChunks(folly::MPMCQueue<std::string>(100)) {\n+}\n+\n+void BlobPutClientReactor::scheduleSendingDataChunk(\n+ const std::string &dataChunk) {\n+ // TODO: we may be copying a big chunk of data, but `write` seems to only\n+ // accept `std::move`\n+ std::string str = std::string(dataChunk);\n+ if (!this->dataChunks.write(std::move(str))) {\n+ throw std::runtime_error(\n+ \"Error scheduling sending a data chunk to send to the blob service\");\n+ }\n+}\n+\n+std::unique_ptr<grpc::Status> BlobPutClientReactor::prepareRequest(\n+ blob::PutRequest &request,\n+ std::shared_ptr<blob::PutResponse> previousResponse) {\n+ if (this->state == State::SEND_HOLDER) {\n+ this->request.set_holder(this->holder);\n+ this->state = State::SEND_HASH;\n+ return nullptr;\n+ }\n+ if (this->state == State::SEND_HASH) {\n+ request.set_blobhash(this->hash);\n+ this->state = State::SEND_CHUNKS;\n+ return nullptr;\n+ }\n+ if (previousResponse->dataexists()) {\n+ return std::make_unique<grpc::Status>(grpc::Status::OK);\n+ }\n+ std::string dataChunk;\n+ this->dataChunks.blockingRead(dataChunk);\n+ if (dataChunk.empty()) {\n+ return std::make_unique<grpc::Status>(grpc::Status::OK);\n+ }\n+ request.set_datachunk(dataChunk);\n+ return nullptr;\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" }, { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/client/blob/ServiceBlobClient.h", "diff": "+#pragma once\n+\n+#include \"BlobPutClientReactor.h\"\n+\n+#include \"../_generated/blob.grpc.pb.h\"\n+#include \"../_generated/blob.pb.h\"\n+\n+#include <grpcpp/grpcpp.h>\n+\n+#include <iostream>\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+\n+class ServiceBlobClient {\n+ std::unique_ptr<blob::BlobService::Stub> stub;\n+\n+ ServiceBlobClient() {\n+ // TODO: handle other types of connection\n+ std::string targetStr = \"blob-server:50051\";\n+ std::shared_ptr<grpc::Channel> channel =\n+ grpc::CreateChannel(targetStr, grpc::InsecureChannelCredentials());\n+ this->stub = blob::BlobService::NewStub(channel);\n+ }\n+\n+public:\n+ static ServiceBlobClient &getInstance() {\n+ // todo consider threads\n+ static ServiceBlobClient instance;\n+ return instance;\n+ }\n+\n+ std::unique_ptr<reactor::BlobPutClientReactor> putReactor;\n+\n+ void put(const std::string &holder, const std::string &hash) {\n+ if (this->putReactor != nullptr && !this->putReactor->isDone()) {\n+ throw std::runtime_error(\n+ \"trying to run reactor while the previous one is not finished yet\");\n+ }\n+ this->putReactor.reset(new reactor::BlobPutClientReactor(holder, hash));\n+ this->stub->async()->Put(&this->putReactor->context, &(*this->putReactor));\n+ this->putReactor->nextWrite();\n+ }\n+ // void get(const std::string &holder);\n+ // void remove(const std::string &holder);\n+};\n+\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add blob client Summary: Depends on D3515 Adding blob client to the backup service Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3466
129,190
31.03.2022 16:20:01
-7,200
cd537913f227b2af6d1f87318b23c3e412c751c0
[services] Backup - Add server reactor implementations - pull backup reactor Summary: Depends on D3466 Add implementation for the pull backup reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h", "diff": "+#pragma once\n+\n+#include \"ServerBidiReactorBase.h\"\n+\n+#include \"../_generated/backup.grpc.pb.h\"\n+#include \"../_generated/backup.pb.h\"\n+\n+#include <iostream>\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+class PullBackupReactor : public ServerBidiReactorBase<\n+ backup::PullBackupRequest,\n+ backup::PullBackupResponse> {\n+public:\n+ std::unique_ptr<ServerBidiReactorStatus> handleRequest(\n+ backup::PullBackupRequest request,\n+ backup::PullBackupResponse *response) override;\n+};\n+\n+std::unique_ptr<ServerBidiReactorStatus> PullBackupReactor::handleRequest(\n+ backup::PullBackupRequest request,\n+ backup::PullBackupResponse *response) {\n+ // TODO handle request\n+ return std::make_unique<ServerBidiReactorStatus>(\n+ grpc::Status(grpc::StatusCode::UNIMPLEMENTED, \"unimplemented\"));\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add server reactor implementations - pull backup reactor Summary: Depends on D3466 Add implementation for the pull backup reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3517
129,179
31.03.2022 10:28:38
14,400
e84e0e6f1daa0ab99a684744f6a190e2cb35db49
[web] [refactor] destructure props to match project Summary: update props to stay consistent with project in side-bar item Test Plan: side bar item still renders and shows unread as expected Reviewers: atul, palys-swm, def-au1t, yayabosh Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/chat/sidebar-item.react.js", "new_path": "web/chat/sidebar-item.react.js", "diff": "@@ -13,10 +13,15 @@ type Props = {\n+sidebarInfo: SidebarInfo,\n};\nfunction SidebarItem(props: Props): React.Node {\n- const { threadInfo } = props.sidebarInfo;\n+ const {\n+ sidebarInfo: { threadInfo },\n+ } = props;\n+ const {\n+ currentUser: { unread },\n+ } = threadInfo;\n+\nconst onClick = useOnClickThread(threadInfo);\n- const { unread } = threadInfo.currentUser;\nconst unreadCls = classNames(css.sidebarTitle, { [css.unread]: unread });\nreturn (\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] destructure props to match project Summary: update props to stay consistent with project in side-bar item Test Plan: side bar item still renders and shows unread as expected Reviewers: atul, palys-swm, def-au1t, yayabosh Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3538
129,184
30.03.2022 16:19:46
14,400
519041e90b4ca64aea6744dee6575bfce7176f0e
[web] Add hover states to "Focus"/"Background" tabs Summary: Quick thing to make things feel more interactive: Test Plan: Looks as expected: {F27416} Reviewers: def-au1t, palys-swm, benschac Subscribers: ashoat, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-tabs.css", "new_path": "web/chat/chat-tabs.css", "diff": "@@ -28,6 +28,11 @@ div.tabItem {\ncolor: var(--color-disabled);\nborder: 2px solid var(--border-color);\nborder-width: 0 0 3px 0;\n+ transition: 150ms;\n+}\n+div.tabItem:hover {\n+ color: var(--fg);\n+ transition: 150ms;\n}\ndiv.tabItem svg {\npadding-right: 8px;\n@@ -40,7 +45,6 @@ div.tabItemActive {\ndiv.tabItemInactive {\nbackground-color: var(--bg);\ncolor: var(--color-disabled);\n- color: var(--fg);\n}\ndiv.threadList {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Add hover states to "Focus"/"Background" tabs Summary: Quick thing to make things feel more interactive: https://linear.app/comm/issue/ENG-952/introduce-hover-states-for-focus-and-background-tabs Test Plan: Looks as expected: {F27416} Reviewers: def-au1t, palys-swm, benschac Reviewed By: palys-swm Subscribers: ashoat, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3574
129,184
29.03.2022 15:32:43
14,400
852cfc7624596b8c2bedebfa5394761030b2c588
[web] Increase clickable region of `ChatThreadListSidebar` Summary: Basically D3543 but for `ChatThreadListSidebar` Clickable area before: {F26853} Clickable area after: {F26854} Test Plan: Looks and behaves as expected: [will drag in video on phabricator] Reviewers: ashoat, palys-swm, def-au1t Subscribers: Adrian, karol-bisztyga, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list-sidebar.react.js", "new_path": "web/chat/chat-thread-list-sidebar.react.js", "diff": "@@ -5,7 +5,10 @@ import * as React from 'react';\nimport type { SidebarInfo } from 'lib/types/thread-types';\n-import { useThreadIsActive } from '../selectors/nav-selectors';\n+import {\n+ useOnClickThread,\n+ useThreadIsActive,\n+} from '../selectors/nav-selectors';\nimport ChatThreadListItemMenu from './chat-thread-list-item-menu.react';\nimport css from './chat-thread-list.css';\nimport SidebarItem from './sidebar-item.react';\n@@ -19,11 +22,14 @@ function ChatThreadListSidebar(props: Props): React.Node {\nconst threadID = threadInfo.id;\nconst active = useThreadIsActive(threadID);\n+ const onClick = useOnClickThread(threadInfo);\n+\nreturn (\n<div\nclassName={classNames(css.threadListSidebar, css.sidebar, {\n[css.activeThread]: active,\n})}\n+ onClick={onClick}\n>\n<SidebarItem sidebarInfo={sidebarInfo} />\n<ChatThreadListItemMenu\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.css", "new_path": "web/chat/chat-thread-list.css", "diff": "@@ -15,6 +15,7 @@ div.threadListSidebar {\npadding-left: 16px;\npadding-right: 10px;\nposition: relative;\n+ cursor: pointer;\n}\ndiv.threadListSidebar > svg {\nposition: absolute;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Increase clickable region of `ChatThreadListSidebar` Summary: Basically D3543 but for `ChatThreadListSidebar` Clickable area before: {F26853} Clickable area after: {F26854} Test Plan: Looks and behaves as expected: [will drag in video on phabricator] Reviewers: ashoat, palys-swm, def-au1t Reviewed By: ashoat, palys-swm Subscribers: Adrian, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3545
129,184
30.03.2022 14:54:07
14,400
b5745bc3701bb9646a20a45df73271d8f31bf652
[web] Add message timestamp to `MessageActionButtons` component Summary: Display message timestamp in `MessageActionButtons` on hover. Additional context here: Depends on D3570 Test Plan: Looks as expected: {F27368} Reviewers: def-au1t, palys-swm, ashoat, benschac Subscribers: Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.css", "new_path": "web/chat/message-action-buttons.css", "diff": "@@ -6,6 +6,25 @@ div.messageActionContainer {\npadding: 0 6px;\nbackground-color: var(--message-action-tooltip-bg);\nborder-radius: 8px;\n+ width: fit-content;\n+}\n+\n+div.timestampContainer {\n+ display: flex;\n+ flex-direction: row;\n+ align-items: center;\n+ justify-content: center;\n+ padding: 0 6px;\n+ margin-top: 6px;\n+ background-color: var(--message-action-tooltip-bg);\n+ border-radius: 8px;\n+ color: var(--tool-tip-color);\n+}\n+\n+div.timestampContainer p {\n+ white-space: nowrap;\n+ padding: 5px;\n+ font-size: var(--s-font-14);\n}\ndiv.messageActionButtons {\n@@ -22,9 +41,13 @@ div.messageActionButtons svg:hover {\n}\ndiv.messageActionButtonsViewer {\nflex-direction: row;\n+ margin-left: auto;\n+ margin-right: 0;\n}\ndiv.messageActionButtonsNonViewer {\nflex-direction: row-reverse;\n+ margin-left: 0;\n+ margin-right: auto;\n}\ndiv.messageActionLinkIcon {\nmargin: 0 3px;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-action-buttons.js", "new_path": "web/chat/message-action-buttons.js", "diff": "@@ -7,8 +7,10 @@ import * as React from 'react';\nimport type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors';\nimport { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';\nimport type { ThreadInfo } from 'lib/types/thread-types';\n+import { longAbsoluteDate } from 'lib/utils/date-utils.js';\nimport type { InputState } from '../input/input-state.js';\n+import { useSelector } from '../redux/redux-utils.js';\nimport {\nuseOnClickThread,\nuseOnClickPendingSidebar,\n@@ -188,6 +190,12 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\n);\n}\n+ const timezone = useSelector(state => state.timeZone);\n+ const timestampText = React.useMemo(\n+ () => longAbsoluteDate(messageInfo.time, timezone),\n+ [messageInfo.time, timezone],\n+ );\n+\nconst { isViewer } = messageInfo.creator;\nconst messageActionButtonsContainerClassName = classNames({\n[css.messageActionContainer]: true,\n@@ -196,10 +204,15 @@ function MessageActionButtons(props: MessageActionButtonsProps): React.Node {\n[css.messageActionButtonsNonViewer]: !isViewer,\n});\nreturn (\n+ <div>\n<div className={messageActionButtonsContainerClassName}>\n{sidebarButton}\n{replyButton}\n</div>\n+ <div className={css.timestampContainer}>\n+ <p>{timestampText}</p>\n+ </div>\n+ </div>\n);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Add message timestamp to `MessageActionButtons` component Summary: Display message timestamp in `MessageActionButtons` on hover. Additional context here: https://linear.app/comm/issue/ENG-799/message-tooltip-position-is-incorrect --- Depends on D3570 Test Plan: Looks as expected: {F27368} Reviewers: def-au1t, palys-swm, ashoat, benschac Reviewed By: ashoat Subscribers: Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3571
129,179
07.03.2022 16:01:31
18,000
8fa68bd370814c4856e079baaa8164d9a342b223
[2/n] [landing] add team to footer component Summary: add team link to footer {F6678} Test Plan: click the footer link, make sure it goes to team page Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, boristopalov
[ { "change_type": "MODIFY", "old_path": "landing/footer.react.js", "new_path": "landing/footer.react.js", "diff": "@@ -5,6 +5,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport * as React from 'react';\nimport { NavLink } from 'react-router-dom';\n+import { isDev } from 'lib/utils/dev-utils';\n+\nimport css from './footer.css';\nimport SubscriptionForm from './subscription-form.react';\n@@ -16,6 +18,15 @@ const navLinkProps = {\n};\nfunction Footer(): React.Node {\n+ let teamLink;\n+ if (isDev) {\n+ teamLink = (\n+ <NavLink to=\"/team\" exact {...navLinkProps}>\n+ Team\n+ </NavLink>\n+ );\n+ }\n+\nreturn (\n<footer className={css.wrapper}>\n<div className={css.contentWrapper}>\n@@ -29,6 +40,7 @@ function Footer(): React.Node {\n<NavLink to=\"/support\" exact {...navLinkProps}>\nSupport\n</NavLink>\n+ {teamLink}\n<NavLink to=\"/terms\" exact {...navLinkProps}>\nTerms of Use\n</NavLink>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[2/n] [landing] add team to footer component Summary: add team link to footer {F6678} Test Plan: click the footer link, make sure it goes to team page Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, boristopalov Differential Revision: https://phabricator.ashoat.com/D2749
129,190
01.04.2022 08:33:37
-7,200
d7d2a98056ef738e591431a03c736c671ac1364f
[services] Backup - Add server reactor implementations - create new backup reactor Summary: Depends on D3517 Add implementation for the create new backup reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/CreateNewBackupReactor.h", "diff": "+#pragma once\n+\n+#include \"ServerBidiReactorBase.h\"\n+#include \"ServiceBlobClient.h\"\n+#include \"Tools.h\"\n+\n+#include \"../_generated/backup.grpc.pb.h\"\n+#include \"../_generated/backup.pb.h\"\n+\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+class CreateNewBackupReactor : public ServerBidiReactorBase<\n+ backup::CreateNewBackupRequest,\n+ backup::CreateNewBackupResponse> {\n+ enum class State {\n+ KEY_ENTROPY = 1,\n+ DATA_HASH = 2,\n+ DATA_CHUNKS = 3,\n+ };\n+\n+ State state = State::KEY_ENTROPY;\n+ std::string keyEntropy;\n+ std::string dataHash;\n+ std::string backupID;\n+\n+ std::string generateBackupID();\n+\n+public:\n+ std::unique_ptr<ServerBidiReactorStatus> handleRequest(\n+ backup::CreateNewBackupRequest request,\n+ backup::CreateNewBackupResponse *response) override;\n+ void doneCallback();\n+};\n+\n+std::string CreateNewBackupReactor::generateBackupID() {\n+ // mock\n+ return generateRandomString();\n+}\n+\n+std::unique_ptr<ServerBidiReactorStatus> CreateNewBackupReactor::handleRequest(\n+ backup::CreateNewBackupRequest request,\n+ backup::CreateNewBackupResponse *response) {\n+ switch (this->state) {\n+ case State::KEY_ENTROPY: {\n+ if (!request.has_keyentropy()) {\n+ throw std::runtime_error(\n+ \"backup key entropy expected but not received\");\n+ }\n+ this->keyEntropy = request.keyentropy();\n+ this->state = State::DATA_HASH;\n+ return nullptr;\n+ }\n+ case State::DATA_HASH: {\n+ if (!request.has_newcompactionhash()) {\n+ throw std::runtime_error(\"data hash expected but not received\");\n+ }\n+ this->dataHash = request.newcompactionhash();\n+ this->state = State::DATA_CHUNKS;\n+\n+ // TODO confirm - holder may be a backup id\n+ this->backupID = this->generateBackupID();\n+ ServiceBlobClient::getInstance().put(this->backupID, this->dataHash);\n+ return nullptr;\n+ }\n+ case State::DATA_CHUNKS: {\n+ // TODO initialize blob client reactor\n+ if (ServiceBlobClient::getInstance().putReactor == nullptr) {\n+ throw std::runtime_error(\n+ \"blob client reactor has not been initialized\");\n+ }\n+\n+ ServiceBlobClient::getInstance().putReactor->scheduleSendingDataChunk(\n+ request.newcompactionchunk());\n+\n+ return nullptr;\n+ }\n+ }\n+ throw std::runtime_error(\"new backup - invalid state\");\n+}\n+\n+void CreateNewBackupReactor::doneCallback() {\n+ ServiceBlobClient::getInstance().putReactor->scheduleSendingDataChunk(\"\");\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add server reactor implementations - create new backup reactor Summary: Depends on D3517 Add implementation for the create new backup reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3467
129,190
01.04.2022 08:35:14
-7,200
a54d824439a5f407e93dc17eb928ad0a2e3d5e56
[services] Backup - Add server reactor implementations - send log reactor Summary: Depends on D3467 Add implementation for the send log reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, varun, geekbrother, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "diff": "+#pragma once\n+\n+#include \"ServerReadReactorBase.h\"\n+\n+#include \"../_generated/backup.grpc.pb.h\"\n+#include \"../_generated/backup.pb.h\"\n+\n+#include <iostream>\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+class SendLogReactor : public ServerReadReactorBase<\n+ backup::SendLogRequest,\n+ google::protobuf::Empty> {\n+\n+public:\n+ using ServerReadReactorBase<backup::SendLogRequest, google::protobuf::Empty>::\n+ ServerReadReactorBase;\n+\n+ std::unique_ptr<grpc::Status>\n+ readRequest(backup::SendLogRequest request) override;\n+ void doneCallback() override;\n+};\n+\n+std::unique_ptr<grpc::Status>\n+SendLogReactor::readRequest(backup::SendLogRequest request) {\n+ // TODO implement\n+ std::cout << \"handle request log chunk \" << request.logdata().size()\n+ << std::endl;\n+ return nullptr;\n+}\n+\n+void SendLogReactor::doneCallback() {\n+ // TODO implement\n+ std::cout << \"receive logs done \" << this->status.error_code() << \"/\"\n+ << this->status.error_message() << std::endl;\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add server reactor implementations - send log reactor Summary: Depends on D3467 Add implementation for the send log reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, varun, geekbrother, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3516
129,190
01.04.2022 08:35:58
-7,200
c6533b46436e797d71a2e0f0468902abd480e8dd
[services] Backup - Add server reactor implementations - recover backup key reactor Summary: Depends on D3516 Add implementation for the recover backup key reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/RecoverBackupKeyReactor.h", "diff": "+#pragma once\n+\n+#include \"ServerBidiReactorBase.h\"\n+\n+#include \"../_generated/backup.grpc.pb.h\"\n+#include \"../_generated/backup.pb.h\"\n+\n+#include <iostream>\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+class RecoverBackupKeyReactor : public ServerBidiReactorBase<\n+ backup::RecoverBackupKeyRequest,\n+ backup::RecoverBackupKeyResponse> {\n+public:\n+ std::unique_ptr<ServerBidiReactorStatus> handleRequest(\n+ backup::RecoverBackupKeyRequest request,\n+ backup::RecoverBackupKeyResponse *response);\n+};\n+\n+std::unique_ptr<ServerBidiReactorStatus> RecoverBackupKeyReactor::handleRequest(\n+ backup::RecoverBackupKeyRequest request,\n+ backup::RecoverBackupKeyResponse *response) { // TODO handle request\n+ return std::make_unique<ServerBidiReactorStatus>(\n+ grpc::Status(grpc::StatusCode::UNIMPLEMENTED, \"unimplemented\"));\n+}\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add server reactor implementations - recover backup key reactor Summary: Depends on D3516 Add implementation for the recover backup key reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3518
129,190
01.04.2022 08:36:32
-7,200
6cede023718fff4a85f3e11b4486f862c3bbed55
[services] Backup - Update service implementation Summary: Depends on D3518 Use server reactor implementations from the D3467 in the service implementation Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: jimpo, geekbrother, varun, palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp", "new_path": "services/backup/docker-server/contents/server/src/BackupServiceImpl.cpp", "diff": "#include \"BackupServiceImpl.h\"\n-#include \"ServerBidiReactorBase.h\"\n-#include \"ServerReadReactorBase.h\"\n+#include \"CreateNewBackupReactor.h\"\n+#include \"PullBackupReactor.h\"\n+#include \"RecoverBackupKeyReactor.h\"\n+#include \"SendLogReactor.h\"\n#include <aws/core/Aws.h>\n@@ -20,79 +22,25 @@ grpc::ServerBidiReactor<\nbackup::CreateNewBackupRequest,\nbackup::CreateNewBackupResponse> *\nBackupServiceImpl::CreateNewBackup(grpc::CallbackServerContext *context) {\n- class CreateNewBackupReactor : public reactor::ServerBidiReactorBase<\n- backup::CreateNewBackupRequest,\n- backup::CreateNewBackupResponse> {\n- public:\n- std::unique_ptr<reactor::ServerBidiReactorStatus> handleRequest(\n- backup::CreateNewBackupRequest request,\n- backup::CreateNewBackupResponse *response) override {\n- // TODO handle request\n- return std::make_unique<reactor::ServerBidiReactorStatus>(\n- grpc::Status(grpc::StatusCode::UNIMPLEMENTED, \"unimplemented\"));\n- }\n- };\n-\n- return new CreateNewBackupReactor();\n+ return new reactor::CreateNewBackupReactor();\n}\ngrpc::ServerReadReactor<backup::SendLogRequest> *BackupServiceImpl::SendLog(\ngrpc::CallbackServerContext *context,\ngoogle::protobuf::Empty *response) {\n- class SendLogReactor : public reactor::ServerReadReactorBase<\n- backup::SendLogRequest,\n- google::protobuf::Empty> {\n- public:\n- using ServerReadReactorBase<\n- backup::SendLogRequest,\n- google::protobuf::Empty>::ServerReadReactorBase;\n- std::unique_ptr<grpc::Status>\n- readRequest(backup::SendLogRequest request) override {\n- // TODO handle request\n- return std::make_unique<grpc::Status>(\n- grpc::StatusCode::UNIMPLEMENTED, \"unimplemented\");\n- }\n- };\n-\n- return new SendLogReactor(response);\n+ return new reactor::SendLogReactor(response);\n}\ngrpc::ServerBidiReactor<\nbackup::RecoverBackupKeyRequest,\nbackup::RecoverBackupKeyResponse> *\nBackupServiceImpl::RecoverBackupKey(grpc::CallbackServerContext *context) {\n- class RecoverBackupKeyReactor : public reactor::ServerBidiReactorBase<\n- backup::RecoverBackupKeyRequest,\n- backup::RecoverBackupKeyResponse> {\n- public:\n- std::unique_ptr<reactor::ServerBidiReactorStatus> handleRequest(\n- backup::RecoverBackupKeyRequest request,\n- backup::RecoverBackupKeyResponse *response) override {\n- // TODO handle request\n- return std::make_unique<reactor::ServerBidiReactorStatus>(\n- grpc::Status(grpc::StatusCode::UNIMPLEMENTED, \"unimplemented\"));\n- }\n- };\n-\n- return new RecoverBackupKeyReactor();\n+ return new reactor::RecoverBackupKeyReactor();\n}\ngrpc::ServerBidiReactor<backup::PullBackupRequest, backup::PullBackupResponse> *\nBackupServiceImpl::PullBackup(grpc::CallbackServerContext *context) {\n- class PullBackupReactor : public reactor::ServerBidiReactorBase<\n- backup::PullBackupRequest,\n- backup::PullBackupResponse> {\n- public:\n- std::unique_ptr<reactor::ServerBidiReactorStatus> handleRequest(\n- backup::PullBackupRequest request,\n- backup::PullBackupResponse *response) override {\n- // TODO handle request\n- return std::make_unique<reactor::ServerBidiReactorStatus>(\n- grpc::Status(grpc::StatusCode::UNIMPLEMENTED, \"unimplemented\"));\n- }\n- };\n-\n- return new PullBackupReactor();\n+ return new reactor::PullBackupReactor();\n}\n} // namespace network\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Update service implementation Summary: Depends on D3518 Use server reactor implementations from the D3467 in the service implementation Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: jimpo, geekbrother, varun, palys-swm Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3468
129,185
25.03.2022 13:18:39
-3,600
60780083d92072fb85e803293b87bab04b4c5020
[web] Introduce member action callbacks in `ThreadMember` component Summary: Introduce callbacks in menu in `ThreadMember` component - the same that are used in mobile app. Test Plan: The actions can be tested after introducing memebrs modal Reviewers: palys-swm, benschac, atul Subscribers: ashoat, palys-swm, Adrian, atul, karol-bisztyga, benschac
[ { "change_type": "MODIFY", "old_path": "web/modals/threads/members/member.react.js", "new_path": "web/modals/threads/members/member.react.js", "diff": "@@ -8,10 +8,16 @@ import {\nimport classNames from 'classnames';\nimport * as React from 'react';\n+import {\n+ removeUsersFromThread,\n+ changeThreadMemberRoles,\n+} from 'lib/actions/thread-actions';\nimport {\nmemberIsAdmin,\nmemberHasAdminPowers,\nthreadHasPermission,\n+ removeMemberFromThread,\n+ switchMemberAdminRoleInThread,\n} from 'lib/shared/thread-utils';\nimport { stringForUser } from 'lib/shared/user-utils';\nimport type { SetState } from 'lib/types/hook-types';\n@@ -20,6 +26,10 @@ import {\ntype ThreadInfo,\nthreadPermissions,\n} from 'lib/types/thread-types';\n+import {\n+ useDispatchActionPromise,\n+ useServerCall,\n+} from 'lib/utils/action-utils';\nimport Label from '../../../components/label.react';\nimport MenuItem from '../../../components/menu-item.react';\n@@ -49,6 +59,41 @@ function ThreadMember(props: Props): React.Node {\n[memberInfo.id, setOpenMenu],\n);\n+ const dispatchActionPromise = useDispatchActionPromise();\n+ const boundRemoveUsersFromThread = useServerCall(removeUsersFromThread);\n+\n+ const onClickRemoveUser = React.useCallback(\n+ () =>\n+ removeMemberFromThread(\n+ threadInfo,\n+ memberInfo,\n+ dispatchActionPromise,\n+ boundRemoveUsersFromThread,\n+ ),\n+ [boundRemoveUsersFromThread, dispatchActionPromise, memberInfo, threadInfo],\n+ );\n+\n+ const isCurrentlyAdmin = memberIsAdmin(memberInfo, threadInfo);\n+ const boundChangeThreadMemberRoles = useServerCall(changeThreadMemberRoles);\n+\n+ const onMemberAdminRoleToggled = React.useCallback(\n+ () =>\n+ switchMemberAdminRoleInThread(\n+ threadInfo,\n+ memberInfo,\n+ isCurrentlyAdmin,\n+ dispatchActionPromise,\n+ boundChangeThreadMemberRoles,\n+ ),\n+ [\n+ boundChangeThreadMemberRoles,\n+ dispatchActionPromise,\n+ isCurrentlyAdmin,\n+ memberInfo,\n+ threadInfo,\n+ ],\n+ );\n+\nconst menuItems = React.useMemo(() => {\nconst { role } = memberInfo;\nif (!role) {\n@@ -73,11 +118,17 @@ function ThreadMember(props: Props): React.Node {\nkey=\"remove_admin\"\ntext=\"Remove admin\"\nicon={faMinusCircle}\n+ onClick={onMemberAdminRoleToggled}\n/>,\n);\n} else if (canChangeRoles && memberInfo.username) {\nactions.push(\n- <MenuItem key=\"make_admin\" text=\"Make admin\" icon={faPlusCircle} />,\n+ <MenuItem\n+ key=\"make_admin\"\n+ text=\"Make admin\"\n+ icon={faPlusCircle}\n+ onClick={onMemberAdminRoleToggled}\n+ />,\n);\n}\n@@ -91,13 +142,14 @@ function ThreadMember(props: Props): React.Node {\nkey=\"remove_user\"\ntext=\"Remove user\"\nicon={faSignOutAlt}\n+ onClick={onClickRemoveUser}\ndangerous\n/>,\n);\n}\nreturn actions;\n- }, [memberInfo, threadInfo]);\n+ }, [memberInfo, onClickRemoveUser, onMemberAdminRoleToggled, threadInfo]);\nconst userSettingsIcon = React.useMemo(\n() => <SWMansionIcon icon=\"edit\" size={17} />,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce member action callbacks in `ThreadMember` component Summary: Introduce callbacks in menu in `ThreadMember` component - the same that are used in mobile app. Test Plan: The actions can be tested after introducing memebrs modal Reviewers: palys-swm, benschac, atul Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, karol-bisztyga, benschac Differential Revision: https://phabricator.ashoat.com/D3382
129,185
25.03.2022 13:18:46
-3,600
bc98f9ff50f326f11fb67ee2f9bc844b355c9b7c
[web] Introduce `MembersModal` Summary: Introduce modal with thread members. It contains tabs with members and admins lists. {F19103} Test Plan: It can be run from thread actions menu after the following diff. Reviewers: palys-swm, benschac, atul, ashoat Subscribers: ashoat, palys-swm, Adrian, atul, karol-bisztyga, benschac
[ { "change_type": "MODIFY", "old_path": "web/modals/threads/members/members-modal.css", "new_path": "web/modals/threads/members/members-modal.css", "diff": "+div.membersContainer {\n+ display: flex;\n+ flex-direction: column;\n+ overflow: hidden;\n+ margin: 16px;\n+}\n+\ndiv.membersList {\noverflow: scroll;\npadding: 8px 0;\n" }, { "change_type": "ADD", "old_path": null, "new_path": "web/modals/threads/members/members-modal.react.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+\n+import { threadInfoSelector } from 'lib/selectors/thread-selectors';\n+import { userStoreSearchIndex } from 'lib/selectors/user-selectors';\n+import { memberHasAdminPowers, memberIsAdmin } from 'lib/shared/thread-utils';\n+import { type RelativeMemberInfo } from 'lib/types/thread-types';\n+\n+import Search from '../../../components/search.react';\n+import Tabs from '../../../components/tabs.react';\n+import { useSelector } from '../../../redux/redux-utils';\n+import Modal from '../../modal.react';\n+import ThreadMembersList from './members-list.react';\n+import css from './members-modal.css';\n+\n+type Props = {\n+ +threadID: string,\n+ +onClose: () => void,\n+};\n+function ThreadMembersModal(props: Props): React.Node {\n+ const { threadID, onClose } = props;\n+\n+ const [tab, setTab] = React.useState<'All Members' | 'Admins'>('All Members');\n+ const [searchText, setSearchText] = React.useState('');\n+\n+ const threadInfo = useSelector(state => threadInfoSelector(state)[threadID]);\n+ const { members: threadMembersNotFiltered } = threadInfo;\n+\n+ const userSearchIndex = useSelector(userStoreSearchIndex);\n+ const userIDs = React.useMemo(\n+ () => userSearchIndex.getSearchResults(searchText),\n+ [searchText, userSearchIndex],\n+ );\n+\n+ const allMembers = React.useMemo(\n+ () =>\n+ threadMembersNotFiltered.filter(\n+ (member: RelativeMemberInfo) =>\n+ searchText.length === 0 || userIDs.includes(member.id),\n+ ),\n+ [searchText.length, threadMembersNotFiltered, userIDs],\n+ );\n+ const adminMembers = React.useMemo(\n+ () =>\n+ allMembers.filter(\n+ (member: RelativeMemberInfo) =>\n+ memberIsAdmin(member, threadInfo) || memberHasAdminPowers(member),\n+ ),\n+ [allMembers, threadInfo],\n+ );\n+\n+ const allUsersTab = React.useMemo(\n+ () => (\n+ <Tabs.Item id=\"All Members\" header=\"All Members\">\n+ <ThreadMembersList threadInfo={threadInfo} threadMembers={allMembers} />\n+ </Tabs.Item>\n+ ),\n+ [allMembers, threadInfo],\n+ );\n+\n+ const allAdminsTab = React.useMemo(\n+ () => (\n+ <Tabs.Item id=\"Admins\" header=\"Admins\">\n+ <ThreadMembersList\n+ threadInfo={threadInfo}\n+ threadMembers={adminMembers}\n+ />\n+ </Tabs.Item>\n+ ),\n+ [adminMembers, threadInfo],\n+ );\n+\n+ return (\n+ <Modal name=\"Members\" onClose={onClose}>\n+ <div className={css.membersContainer}>\n+ <Search\n+ onChangeText={setSearchText}\n+ searchText={searchText}\n+ placeholder=\"Search members\"\n+ />\n+ <Tabs.Container activeTab={tab} setTab={setTab}>\n+ {allUsersTab}\n+ {allAdminsTab}\n+ </Tabs.Container>\n+ </div>\n+ </Modal>\n+ );\n+}\n+\n+export default ThreadMembersModal;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `MembersModal` Summary: Introduce modal with thread members. It contains tabs with members and admins lists. {F19103} Test Plan: It can be run from thread actions menu after the following diff. Reviewers: palys-swm, benschac, atul, ashoat Reviewed By: palys-swm, benschac, ashoat Subscribers: ashoat, palys-swm, Adrian, atul, karol-bisztyga, benschac Differential Revision: https://phabricator.ashoat.com/D3384
129,200
01.04.2022 15:24:13
14,400
1525275526a6f477440106d459afe2a2598f9ea4
[docs] make visual studio code section more precise Summary: removed an unnecessary sentence and changed `VSCode` to `Visual Studio Code` Test Plan: docs Reviewers: geekbrother, atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "docs/dev_services.md", "new_path": "docs/dev_services.md", "diff": "@@ -56,6 +56,6 @@ You can find the full list of scripts [here](https://github.com/CommE2E/comm/blo\n# Developing and debugging\n-## VSCode\n+## Visual Studio Code\n-If you are using VSCode as your code editor you can [attach to a Docker container](https://code.visualstudio.com/docs/remote/attach-container) and develop right inside it. That will save you time and resources neither deploy the code into container every time.\n+If you are using Visual Studio Code as your code editor you can [attach to a Docker container](https://code.visualstudio.com/docs/remote/attach-container) and develop inside it.\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[docs] make visual studio code section more precise Summary: removed an unnecessary sentence and changed `VSCode` to `Visual Studio Code` Test Plan: docs Reviewers: geekbrother, atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3603
129,190
01.04.2022 08:50:16
-7,200
d0b3a163e2fb4be1fe5d5738aea80e15dfbeb3a3
[services] Blob - Add server reactor implementations - get reactor Summary: Depends on D3520 Add implementations for the server reactors - get reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/blob/src/Reactors/server/GetReactor.h", "diff": "+#pragma once\n+\n+#include \"ServerWriteReactorBase.h\"\n+\n+#include \"../_generated/blob.grpc.pb.h\"\n+#include \"../_generated/blob.pb.h\"\n+\n+#include <aws/s3/model/GetObjectRequest.h>\n+\n+#include <iostream>\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+class GetReactor\n+ : public ServerWriteReactorBase<blob::GetRequest, blob::GetResponse> {\n+ size_t offset = 0;\n+ size_t fileSize = 0;\n+ const size_t chunkSize =\n+ GRPC_CHUNK_SIZE_LIMIT - GRPC_METADATA_SIZE_PER_MESSAGE;\n+ database::S3Path s3Path;\n+ Aws::S3::Model::GetObjectRequest getRequest;\n+\n+public:\n+ using ServerWriteReactorBase<blob::GetRequest, blob::GetResponse>::\n+ ServerWriteReactorBase;\n+\n+ std::unique_ptr<grpc::Status>\n+ writeResponse(blob::GetResponse *response) override {\n+ if (this->offset >= this->fileSize) {\n+ return std::make_unique<grpc::Status>(grpc::Status::OK);\n+ }\n+\n+ const size_t nextSize =\n+ std::min(this->chunkSize, this->fileSize - this->offset);\n+\n+ std::string range = \"bytes=\" + std::to_string(this->offset) + \"-\" +\n+ std::to_string(this->offset + nextSize);\n+ this->getRequest.SetRange(range);\n+\n+ Aws::S3::Model::GetObjectOutcome getOutcome =\n+ getS3Client()->GetObject(this->getRequest);\n+ if (!getOutcome.IsSuccess()) {\n+ return std::make_unique<grpc::Status>(\n+ grpc::StatusCode::INTERNAL, getOutcome.GetError().GetMessage());\n+ }\n+\n+ Aws::IOStream &retrievedFile =\n+ getOutcome.GetResultWithOwnership().GetBody();\n+ std::string result;\n+ result.resize(nextSize);\n+ retrievedFile.get((char *)result.data(), nextSize + 1);\n+ response->set_datachunk(result);\n+\n+ this->offset += nextSize;\n+ return nullptr;\n+ }\n+\n+ void initialize() override {\n+ this->s3Path = findS3Path(this->request.holder());\n+ this->fileSize =\n+ getBucket(s3Path.getBucketName()).getObjectSize(s3Path.getObjectName());\n+\n+ this->getRequest.SetBucket(this->s3Path.getBucketName());\n+ this->getRequest.SetKey(this->s3Path.getObjectName());\n+\n+ AwsS3Bucket bucket = getBucket(this->s3Path.getBucketName());\n+ if (!bucket.isAvailable()) {\n+ throw std::runtime_error(\n+ \"bucket [\" + this->s3Path.getBucketName() + \"] not available\");\n+ }\n+ const size_t fileSize = bucket.getObjectSize(this->s3Path.getObjectName());\n+ if (this->fileSize == 0) {\n+ throw std::runtime_error(\"object empty\");\n+ }\n+ };\n+\n+ void doneCallback() override{};\n+};\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Blob - Add server reactor implementations - get reactor Summary: Depends on D3520 Add implementations for the server reactors - get reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3470
129,190
01.04.2022 08:50:19
-7,200
0f1c274ceed378cfbe728e15347ba80695cc460f
[services] Blob - Add server reactor implementations - put reactor Summary: Depends on D3470 Add implementations for the server reactors - put reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, varun, jimpo, ashoat Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "ADD", "old_path": null, "new_path": "services/blob/src/Reactors/server/PutReactor.h", "diff": "+#pragma once\n+\n+#include \"ServerBidiReactorBase.h\"\n+\n+#include \"../_generated/blob.grpc.pb.h\"\n+#include \"../_generated/blob.pb.h\"\n+\n+#include <memory>\n+#include <string>\n+\n+namespace comm {\n+namespace network {\n+namespace reactor {\n+\n+class PutReactor\n+ : public ServerBidiReactorBase<blob::PutRequest, blob::PutResponse> {\n+ std::string holder;\n+ std::string blobHash;\n+ std::string currentChunk;\n+ std::unique_ptr<database::S3Path> s3Path;\n+ std::shared_ptr<database::BlobItem> blobItem;\n+ std::unique_ptr<MultiPartUploader> uploader;\n+\n+public:\n+ std::unique_ptr<ServerBidiReactorStatus> handleRequest(\n+ blob::PutRequest request,\n+ blob::PutResponse *response) override {\n+ if (this->holder.empty()) {\n+ if (request.holder().empty()) {\n+ throw std::runtime_error(\"holder has not been provided\");\n+ }\n+ this->holder = request.holder();\n+ return nullptr;\n+ }\n+ if (this->blobHash.empty()) {\n+ if (request.blobhash().empty()) {\n+ throw std::runtime_error(\"blob hash has not been provided\");\n+ }\n+ this->blobHash = request.blobhash();\n+ this->blobItem =\n+ database::DatabaseManager::getInstance().findBlobItem(this->blobHash);\n+ if (this->blobItem != nullptr) {\n+ this->s3Path =\n+ std::make_unique<database::S3Path>(this->blobItem->getS3Path());\n+ response->set_dataexists(true);\n+ return std::make_unique<ServerBidiReactorStatus>(\n+ grpc::Status::OK, true);\n+ }\n+ this->s3Path = std::make_unique<database::S3Path>(\n+ generateS3Path(BLOB_BUCKET_NAME, this->blobHash));\n+ this->blobItem =\n+ std::make_shared<database::BlobItem>(this->blobHash, *s3Path);\n+ response->set_dataexists(false);\n+ return nullptr;\n+ }\n+ if (request.datachunk().empty()) {\n+ return std::make_unique<ServerBidiReactorStatus>(grpc::Status(\n+ grpc::StatusCode::INVALID_ARGUMENT, \"data chunk expected\"));\n+ }\n+ if (this->uploader == nullptr) {\n+ this->uploader = std::make_unique<MultiPartUploader>(\n+ getS3Client(), BLOB_BUCKET_NAME, s3Path->getObjectName());\n+ }\n+ this->currentChunk += request.datachunk();\n+ if (this->currentChunk.size() > AWS_MULTIPART_UPLOAD_MINIMUM_CHUNK_SIZE) {\n+ this->uploader->addPart(this->currentChunk);\n+ this->currentChunk.clear();\n+ }\n+ return nullptr;\n+ }\n+\n+ void terminateCallback() override {\n+ if (!this->status.status.ok()) {\n+ return;\n+ }\n+ if (!this->readingAborted || this->uploader == nullptr) {\n+ throw std::runtime_error(this->status.status.error_message());\n+ }\n+ if (!currentChunk.empty()) {\n+ this->uploader->addPart(this->currentChunk);\n+ }\n+ this->uploader->finishUpload();\n+ database::DatabaseManager::getInstance().putBlobItem(*this->blobItem);\n+ const database::ReverseIndexItem reverseIndexItem(holder, this->blobHash);\n+ database::DatabaseManager::getInstance().putReverseIndexItem(\n+ reverseIndexItem);\n+ }\n+};\n+\n+} // namespace reactor\n+} // namespace network\n+} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Blob - Add server reactor implementations - put reactor Summary: Depends on D3470 Add implementations for the server reactors - put reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, varun, jimpo, ashoat Reviewed By: palys-swm, ashoat Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3521
129,190
01.04.2022 08:50:23
-7,200
9262ba1f6dfa8402217e77e183a88c7393312f44
[services] Blob - Update service implementation Summary: Depends on D3521 Update implementation of the blob service Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, jimpo, varun Subscribers: ashoat, palys-swm, Adrian, atul, benschac
[ { "change_type": "MODIFY", "old_path": "services/blob/src/BlobServiceImpl.cpp", "new_path": "services/blob/src/BlobServiceImpl.cpp", "diff": "#include \"MultiPartUploader.h\"\n#include \"Tools.h\"\n+#include \"GetReactor.h\"\n+#include \"PutReactor.h\"\n+\n#include <iostream>\n#include <memory>\n@@ -46,112 +49,25 @@ void BlobServiceImpl::assignVariableIfEmpty(\nlvalue = rvalue;\n}\n-grpc::Status BlobServiceImpl::Put(\n- grpc::ServerContext *context,\n- grpc::ServerReaderWriter<blob::PutResponse, blob::PutRequest> *stream) {\n- blob::PutRequest request;\n- std::string holder;\n- std::string receivedBlobHash;\n- std::unique_ptr<database::S3Path> s3Path;\n- std::shared_ptr<database::BlobItem> blobItem;\n- std::unique_ptr<MultiPartUploader> uploader;\n- std::string currentChunk;\n- blob::PutResponse response;\n- try {\n- while (stream->Read(&request)) {\n- const std::string requestHolder = request.holder();\n- const std::string requestBlobHash = request.blobhash();\n- const std::string receivedDataChunk = request.datachunk();\n- if (requestHolder.size()) {\n- assignVariableIfEmpty(\"holder\", holder, requestHolder);\n- } else if (requestBlobHash.size()) {\n- assignVariableIfEmpty(\"blob hash\", receivedBlobHash, requestBlobHash);\n- } else if (receivedDataChunk.size()) {\n- if (s3Path == nullptr) {\n- throw std::runtime_error(\n- \"S3 path or/and MPU has not been created but data \"\n- \"chunks are being pushed\");\n- }\n- if (uploader == nullptr) {\n- uploader = std::make_unique<MultiPartUploader>(\n- getS3Client(), BLOB_BUCKET_NAME, s3Path->getObjectName());\n- }\n- currentChunk += receivedDataChunk;\n- if (currentChunk.size() > AWS_MULTIPART_UPLOAD_MINIMUM_CHUNK_SIZE) {\n- uploader->addPart(currentChunk);\n- currentChunk.clear();\n- }\n- }\n- if (holder.size() && receivedBlobHash.size() && s3Path == nullptr) {\n- blobItem = database::DatabaseManager::getInstance().findBlobItem(\n- receivedBlobHash);\n- if (blobItem != nullptr) {\n- s3Path = std::make_unique<database::S3Path>(blobItem->getS3Path());\n- response.set_dataexists(true);\n- stream->Write(response);\n- break;\n- }\n- s3Path = std::make_unique<database::S3Path>(\n- generateS3Path(BLOB_BUCKET_NAME, receivedBlobHash));\n- response.set_dataexists(false);\n- stream->Write(response);\n- }\n- }\n- if (!currentChunk.empty()) {\n- uploader->addPart(currentChunk);\n- }\n- if (blobItem == nullptr) {\n- uploader->finishUpload();\n- }\n- this->verifyBlobHash(receivedBlobHash, *s3Path);\n- if (blobItem == nullptr) {\n- blobItem =\n- std::make_shared<database::BlobItem>(receivedBlobHash, *s3Path);\n- database::DatabaseManager::getInstance().putBlobItem(*blobItem);\n+grpc::ServerBidiReactor<blob::PutRequest, blob::PutResponse> *\n+BlobServiceImpl::Put(grpc::CallbackServerContext *context) {\n+ return new reactor::PutReactor();\n}\n- const database::ReverseIndexItem reverseIndexItem(holder, receivedBlobHash);\n- database::DatabaseManager::getInstance().putReverseIndexItem(\n- reverseIndexItem);\n- } catch (std::runtime_error &e) {\n- std::cout << \"error: \" << e.what() << std::endl;\n- return grpc::Status(grpc::StatusCode::INTERNAL, e.what());\n- }\n- return grpc::Status::OK;\n-}\n-\n-grpc::Status BlobServiceImpl::Get(\n- grpc::ServerContext *context,\n- const blob::GetRequest *request,\n- grpc::ServerWriter<blob::GetResponse> *writer) {\n- const std::string holder = request->holder();\n- try {\n- database::S3Path s3Path = findS3Path(holder);\n- AwsS3Bucket bucket = getBucket(s3Path.getBucketName());\n- blob::GetResponse response;\n- std::function<void(const std::string &)> callback =\n- [&response, &writer](const std::string &chunk) {\n- response.set_datachunk(chunk);\n- if (!writer->Write(response)) {\n- throw std::runtime_error(\"writer interrupted sending data\");\n- }\n- };\n+grpc::ServerWriteReactor<blob::GetResponse> *BlobServiceImpl::Get(\n+ grpc::CallbackServerContext *context,\n+ const blob::GetRequest *request) {\n- bucket.getObjectDataChunks(\n- s3Path.getObjectName(),\n- callback,\n- GRPC_CHUNK_SIZE_LIMIT - GRPC_METADATA_SIZE_PER_MESSAGE);\n- } catch (std::runtime_error &e) {\n- std::cout << \"error: \" << e.what() << std::endl;\n- return grpc::Status(grpc::StatusCode::INTERNAL, e.what());\n- }\n- return grpc::Status::OK;\n+ reactor::GetReactor *gr = new reactor::GetReactor(request);\n+ gr->NextWrite();\n+ return gr;\n}\n-grpc::Status BlobServiceImpl::Remove(\n- grpc::ServerContext *context,\n+grpc::ServerUnaryReactor *BlobServiceImpl::Remove(\n+ grpc::CallbackServerContext *context,\nconst blob::RemoveRequest *request,\ngoogle::protobuf::Empty *response) {\n+ grpc::Status status = grpc::Status::OK;\nconst std::string holder = request->holder();\ntry {\nstd::shared_ptr<database::ReverseIndexItem> reverseIndexItem =\n@@ -180,9 +96,11 @@ grpc::Status BlobServiceImpl::Remove(\n}\n} catch (std::runtime_error &e) {\nstd::cout << \"error: \" << e.what() << std::endl;\n- return grpc::Status(grpc::StatusCode::INTERNAL, e.what());\n+ status = grpc::Status(grpc::StatusCode::INTERNAL, e.what());\n}\n- return grpc::Status::OK;\n+ auto *reactor = context->DefaultReactor();\n+ reactor->Finish(status);\n+ return reactor;\n}\n} // namespace network\n" }, { "change_type": "MODIFY", "old_path": "services/blob/src/BlobServiceImpl.h", "new_path": "services/blob/src/BlobServiceImpl.h", "diff": "namespace comm {\nnamespace network {\n-class BlobServiceImpl final : public blob::BlobService::Service {\n+class BlobServiceImpl final : public blob::BlobService::CallbackService {\nvoid verifyBlobHash(\nconst std::string &expectedBlobHash,\nconst database::S3Path &s3Path);\n@@ -27,16 +27,13 @@ public:\nBlobServiceImpl();\nvirtual ~BlobServiceImpl();\n- grpc::Status\n- Put(grpc::ServerContext *context,\n- grpc::ServerReaderWriter<blob::PutResponse, blob::PutRequest> *stream)\n- override;\n- grpc::Status\n- Get(grpc::ServerContext *context,\n- const blob::GetRequest *request,\n- grpc::ServerWriter<blob::GetResponse> *writer) override;\n- grpc::Status Remove(\n- grpc::ServerContext *context,\n+ grpc::ServerBidiReactor<blob::PutRequest, blob::PutResponse> *\n+ Put(grpc::CallbackServerContext *context) override;\n+ grpc::ServerWriteReactor<blob::GetResponse> *\n+ Get(grpc::CallbackServerContext *context,\n+ const blob::GetRequest *request) override;\n+ grpc::ServerUnaryReactor *Remove(\n+ grpc::CallbackServerContext *context,\nconst blob::RemoveRequest *request,\ngoogle::protobuf::Empty *response) override;\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Blob - Update service implementation Summary: Depends on D3521 Update implementation of the blob service Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: geekbrother, palys-swm, jimpo, varun Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac Differential Revision: https://phabricator.ashoat.com/D3471
129,179
04.04.2022 10:24:43
14,400
18a5e194e034a9549a9e95b61c1fe2054a286ac0
[web] [refactor] use assetUrl variable Summary: swap hard coded url for assetUrl variable like the rest of the project uses. {F29632} Test Plan: go to the keyserver page. arrow should render. Reviewers: atul, palys-swm, def-au1t, yayabosh Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "landing/read-docs-btn.react.js", "new_path": "landing/read-docs-btn.react.js", "diff": "import * as React from 'react';\n+import { assetUrl } from './asset-meta-data';\nimport css from './read-docs-btn.css';\nfunction ReadDocsButton(): React.Node {\n@@ -12,10 +13,7 @@ function ReadDocsButton(): React.Node {\n>\n<button className={css.button}>\n<span className={css.buttonText}>Read the documentation</span>\n- <img\n- src=\"https://dh9fld3hutpxf.cloudfront.net/corner_arrow.svg\"\n- className={css.cornerIcon}\n- />\n+ <img src={`${assetUrl}/corner_arrow.svg`} className={css.cornerIcon} />\n</button>\n</a>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] use assetUrl variable Summary: swap hard coded url for assetUrl variable like the rest of the project uses. {F29632} Test Plan: go to the keyserver page. arrow should render. Reviewers: atul, palys-swm, def-au1t, yayabosh Reviewed By: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3611
129,179
05.04.2022 15:45:18
14,400
98a4cdea0d312527ebe7a45bbce7cf2638d5eb83
[web] [refactor] rename assetUrl to assetsCacheURLPrefix Summary: rename, did a findall, replace using vscode tool Test Plan: run landing project. Images load Reviewers: atul, palys-swm, def-au1t, yayabosh Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "landing/asset-meta-data.js", "new_path": "landing/asset-meta-data.js", "diff": "@@ -11,11 +11,11 @@ export type Asset = {\n+infoStyle: string,\n};\n-export const assetUrl = 'https://dh9fld3hutpxf.cloudfront.net';\n+export const assetsCacheURLPrefix = 'https://dh9fld3hutpxf.cloudfront.net';\nexport const assetMetaData = [\n{\nalt: 'a mobile phone screen highlighting chat and DAO voting',\n- url: `${assetUrl}/Header`,\n+ url: `${assetsCacheURLPrefix}/Header`,\nimageStyle: css.heroImage,\ninfoStyle: css.heroInfo,\ntitle: 'Header',\n@@ -23,7 +23,7 @@ export const assetMetaData = [\n},\n{\nalt: 'a mobile phone screen highlighting chat organization',\n- url: `${assetUrl}/Federated`,\n+ url: `${assetsCacheURLPrefix}/Federated`,\nimageStyle: css.federatedImage,\ninfoStyle: css.federatedInfo,\ntitle: 'Federated',\n@@ -34,7 +34,7 @@ export const assetMetaData = [\n},\n{\nalt: 'a web app screen highlighting web3 apps in Comm',\n- url: `${assetUrl}/Customizable`,\n+ url: `${assetsCacheURLPrefix}/Customizable`,\nimageStyle: css.customizableImage,\ninfoStyle: css.customizableInfo,\ntitle: 'Customizable',\n@@ -43,7 +43,7 @@ export const assetMetaData = [\n},\n{\nalt: 'a mobile phone screen highlighting a conversation',\n- url: `${assetUrl}/E2E-encrypted`,\n+ url: `${assetsCacheURLPrefix}/E2E-encrypted`,\nimageStyle: css.encryptedImage,\ninfoStyle: css.encryptedInfo,\ntitle: 'E2E-encrypted',\n@@ -52,7 +52,7 @@ export const assetMetaData = [\n},\n{\nalt: 'a mobile phone user information screen',\n- url: `${assetUrl}/Sovereign`,\n+ url: `${assetsCacheURLPrefix}/Sovereign`,\nimageStyle: css.sovereignImage,\ninfoStyle: css.sovereignInfo,\ntitle: 'Sovereign',\n@@ -61,7 +61,7 @@ export const assetMetaData = [\n},\n{\nalt: 'a web app screen highlighting web3 apps in Comm',\n- url: `${assetUrl}/Open-Source`,\n+ url: `${assetsCacheURLPrefix}/Open-Source`,\nimageStyle: css.openSourceImage,\ninfoStyle: css.openSourceInfo,\ntitle: 'Open Source',\n@@ -70,7 +70,7 @@ export const assetMetaData = [\n},\n{\nalt: 'a mobile phone notification options screen',\n- url: `${assetUrl}/Less-Noisy`,\n+ url: `${assetsCacheURLPrefix}/Less-Noisy`,\nimageStyle: css.lessNoisyImage,\ninfoStyle: css.lessNoisyInfo,\ntitle: 'Less Noisy',\n" }, { "change_type": "MODIFY", "old_path": "landing/keyservers.react.js", "new_path": "landing/keyservers.react.js", "diff": "import { create } from '@lottiefiles/lottie-interactivity';\nimport * as React from 'react';\n-import { assetUrl } from './asset-meta-data';\n+import { assetsCacheURLPrefix } from './asset-meta-data';\nimport css from './keyservers.css';\nimport ReadDocsButton from './read-docs-btn.react';\nimport StarBackground from './star-background.react';\n@@ -76,7 +76,7 @@ function Keyservers(): React.Node {\nid=\"eye-illustration\"\nref={setEyeNode}\nmode=\"normal\"\n- src={`${assetUrl}/animated_eye.json`}\n+ src={`${assetsCacheURLPrefix}/animated_eye.json`}\nspeed={1}\n/>\n</div>\n@@ -100,7 +100,7 @@ function Keyservers(): React.Node {\nid=\"cloud-illustration\"\nref={setCloudNode}\nmode=\"normal\"\n- src={`${assetUrl}/animated_cloud.json`}\n+ src={`${assetsCacheURLPrefix}/animated_cloud.json`}\nspeed={1}\n/>\n</div>\n" }, { "change_type": "MODIFY", "old_path": "landing/read-docs-btn.react.js", "new_path": "landing/read-docs-btn.react.js", "diff": "import * as React from 'react';\n-import { assetUrl } from './asset-meta-data';\n+import { assetsCacheURLPrefix } from './asset-meta-data';\nimport css from './read-docs-btn.css';\nfunction ReadDocsButton(): React.Node {\n@@ -13,7 +13,10 @@ function ReadDocsButton(): React.Node {\n>\n<button className={css.button}>\n<span className={css.buttonText}>Read the documentation</span>\n- <img src={`${assetUrl}/corner_arrow.svg`} className={css.cornerIcon} />\n+ <img\n+ src={`${assetsCacheURLPrefix}/corner_arrow.svg`}\n+ className={css.cornerIcon}\n+ />\n</button>\n</a>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] [ENG-971] rename assetUrl to assetsCacheURLPrefix Summary: rename, did a findall, replace using vscode tool https://linear.app/comm/issue/ENG-971/rename-asseturl-to-assetscacheurlprefix Test Plan: run landing project. Images load Reviewers: atul, palys-swm, def-au1t, yayabosh Reviewed By: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3617
129,179
04.04.2022 15:56:48
14,400
d04163e9c8f7d8aa55a0e2265a25fda56556d3a5
[web] [refactor] destructure props in confirm-leave-thread-modal Summary: just moving props to a destructure on top of file Test Plan: click leave button Reviewers: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/modals/threads/confirm-leave-thread-modal.react.js", "new_path": "web/modals/threads/confirm-leave-thread-modal.react.js", "diff": "@@ -14,16 +14,19 @@ type Props = {\n+onConfirm: () => void,\n};\nfunction ConfirmLeaveThreadModal(props: Props): React.Node {\n+ const { threadInfo, onClose, onConfirm } = props;\n+ const { uiName } = threadInfo;\n+\nreturn (\n- <Modal name=\"Confirm leave thread\" onClose={props.onClose}>\n+ <Modal name=\"Confirm leave thread\" onClose={onClose}>\n<div className={css['modal-body']}>\n<p>\n{'Are you sure you want to leave \"'}\n- <span className={css['thread-name']}>{props.threadInfo.uiName}</span>\n+ <span className={css['thread-name']}>{uiName}</span>\n{'\"?'}\n</p>\n<div className={css['form-footer']}>\n- <Button onClick={props.onConfirm} type=\"submit\">\n+ <Button onClick={onConfirm} type=\"submit\">\nLeave Thread\n</Button>\n</div>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] [ENG-716] destructure props in confirm-leave-thread-modal Summary: just moving props to a destructure on top of file https://linear.app/comm/issue/ENG-716/introduce-leave-channel-modal Test Plan: click leave button Reviewers: atul Reviewed By: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3613
129,203
01.04.2022 17:22:38
25,200
a3532d10d1c37e3a5bfc2cd5852eb7e0f1816d82
[web] Removed extraneous `.loading-indicator-loading` CSS selector Summary: Noticed this CSS selector and rule was repeated twice in the same file. Removed the second occurrence. Test Plan: Close reading. Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, benschac
[ { "change_type": "MODIFY", "old_path": "web/style.css", "new_path": "web/style.css", "diff": "@@ -107,9 +107,6 @@ span.loading-indicator-loading {\ntransform: rotate(360deg);\n}\n}\n-span.loading-indicator-loading {\n- display: inline-block;\n-}\nspan.loading-indicator-loading-medium:after {\ncontent: ' ';\ndisplay: block;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Removed extraneous `.loading-indicator-loading` CSS selector Summary: Noticed this CSS selector and rule was repeated twice in the same file. Removed the second occurrence. Test Plan: Close reading. Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, benschac Differential Revision: https://phabricator.ashoat.com/D3606
129,184
05.04.2022 13:58:27
14,400
ad6d2646d75105368b67da72db6ebea825cc6bb2
[docs] Fix `generate-olm-config.js` script in `dev_environment` docs Summary: filename suffix should've been `.js` not `.json` Test Plan: didn't work before, now it does work Reviewers: palys-swm, ashoat, benschac, yayabosh Subscribers: Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "docs/dev_environment.md", "new_path": "docs/dev_environment.md", "diff": "@@ -573,7 +573,7 @@ The second config file contains some details that the keyserver needs in order t\n```\ncd keyserver\n-yarn script dist/scripts/generate-olm-config.json\n+yarn script dist/scripts/generate-olm-config.js\n```\nThis script will create the `keyserver/secrets/olm_config.json` config file.\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[docs] Fix `generate-olm-config.js` script in `dev_environment` docs Summary: filename suffix should've been `.js` not `.json` Test Plan: didn't work before, now it does work Reviewers: palys-swm, ashoat, benschac, yayabosh Reviewed By: ashoat, yayabosh Subscribers: Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3621
129,187
30.03.2022 11:28:17
14,400
8c887ebc7fb9702487fe3873534528c7b835fb72
[lib] New action to fetch single message for a list of threads Summary: Needed to fetch messages for message previews Test Plan: promised to help test this :) Reviewers: def-au1t Subscribers: palys-swm, Adrian, atul, karol-bisztyga, benschac, yayabosh, def-au1t
[ { "change_type": "MODIFY", "old_path": "lib/actions/message-actions.js", "new_path": "lib/actions/message-actions.js", "diff": "@@ -5,6 +5,7 @@ import invariant from 'invariant';\nimport type {\nFetchMessageInfosPayload,\nSendMessageResult,\n+ SimpleMessagesPayload,\n} from '../types/message-types';\nimport type { FetchJSON, FetchResultInfo } from '../utils/fetch-json';\n@@ -56,6 +57,29 @@ const fetchMostRecentMessages = (\n};\n};\n+const fetchSingleMostRecentMessagesFromThreadsActionTypes = Object.freeze({\n+ started: 'FETCH_SINGLE_MOST_RECENT_MESSAGES_FROM_THREADS_STARTED',\n+ success: 'FETCH_SINGLE_MOST_RECENT_MESSAGES_FROM_THREADS_SUCCESS',\n+ failed: 'FETCH_SINGLE_MOST_RECENT_MESSAGES_FROM_THREADS_FAILED',\n+});\n+const fetchSingleMostRecentMessagesFromThreads = (\n+ fetchJSON: FetchJSON,\n+): ((\n+ threadIDs: $ReadOnlyArray<string>,\n+) => Promise<SimpleMessagesPayload>) => async threadIDs => {\n+ const cursors = Object.fromEntries(\n+ threadIDs.map(threadID => [threadID, null]),\n+ );\n+ const response = await fetchJSON('fetch_messages', {\n+ cursors,\n+ numberPerThread: 1,\n+ });\n+ return {\n+ rawMessageInfos: response.rawMessageInfos,\n+ truncationStatuses: response.truncationStatuses,\n+ };\n+};\n+\nconst sendTextMessageActionTypes = Object.freeze({\nstarted: 'SEND_TEXT_MESSAGE_STARTED',\nsuccess: 'SEND_TEXT_MESSAGE_SUCCESS',\n@@ -142,6 +166,8 @@ export {\nfetchMessagesBeforeCursor,\nfetchMostRecentMessagesActionTypes,\nfetchMostRecentMessages,\n+ fetchSingleMostRecentMessagesFromThreadsActionTypes,\n+ fetchSingleMostRecentMessagesFromThreads,\nsendTextMessageActionTypes,\nsendTextMessage,\ncreateLocalMessageActionType,\n" }, { "change_type": "MODIFY", "old_path": "lib/reducers/message-reducer.js", "new_path": "lib/reducers/message-reducer.js", "diff": "@@ -29,6 +29,7 @@ import {\nprocessMessagesActionType,\nmessageStorePruneActionType,\ncreateLocalMessageActionType,\n+ fetchSingleMostRecentMessagesFromThreadsActionTypes,\nsetMessageStoreMessages,\n} from '../actions/message-actions';\nimport {\n@@ -807,6 +808,20 @@ function reduceMessageStore(\naction.type,\n);\nreturn { messageStoreOperations, messageStore: mergedMessageStore };\n+ } else if (\n+ action.type === fetchSingleMostRecentMessagesFromThreadsActionTypes.success\n+ ) {\n+ const {\n+ messageStoreOperations,\n+ messageStore: mergedMessageStore,\n+ } = mergeNewMessages(\n+ messageStore,\n+ action.payload.rawMessageInfos,\n+ action.payload.truncationStatuses,\n+ newThreadInfos,\n+ action.type,\n+ );\n+ return { messageStoreOperations, messageStore: mergedMessageStore };\n} else if (\naction.type === fetchMessagesBeforeCursorActionTypes.success ||\naction.type === fetchMostRecentMessagesActionTypes.success\n" }, { "change_type": "MODIFY", "old_path": "lib/types/message-types.js", "new_path": "lib/types/message-types.js", "diff": "@@ -467,6 +467,10 @@ export type MessagesResponse = {\n+truncationStatuses: MessageTruncationStatuses,\n+currentAsOf: number,\n};\n+export type SimpleMessagesPayload = {\n+ +rawMessageInfos: $ReadOnlyArray<RawMessageInfo>,\n+ +truncationStatuses: MessageTruncationStatuses,\n+};\nexport const defaultNumberPerThread = 20;\nexport const defaultMaxMessageAge = 14 * 24 * 60 * 60 * 1000; // 2 weeks\n" }, { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -43,6 +43,7 @@ import type {\nMessageStorePrunePayload,\nLocallyComposedMessageInfo,\nClientDBMessageInfo,\n+ SimpleMessagesPayload,\n} from './message-types';\nimport type { RawTextMessageInfo } from './messages/text';\nimport type { BaseNavInfo } from './nav-types';\n@@ -464,6 +465,22 @@ export type BaseAction =\n+payload: FetchMessageInfosPayload,\n+loadingInfo: LoadingInfo,\n}\n+ | {\n+ +type: 'FETCH_SINGLE_MOST_RECENT_MESSAGES_FROM_THREADS_STARTED',\n+ +payload?: void,\n+ +loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'FETCH_SINGLE_MOST_RECENT_MESSAGES_FROM_THREADS_FAILED',\n+ +error: true,\n+ +payload: Error,\n+ +loadingInfo: LoadingInfo,\n+ }\n+ | {\n+ +type: 'FETCH_SINGLE_MOST_RECENT_MESSAGES_FROM_THREADS_SUCCESS',\n+ +payload: SimpleMessagesPayload,\n+ +loadingInfo: LoadingInfo,\n+ }\n| {\n+type: 'SEND_TEXT_MESSAGE_STARTED',\n+loadingInfo?: LoadingInfo,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] New action to fetch single message for a list of threads Summary: Needed to fetch messages for message previews Test Plan: @def-au1t promised to help test this :) Reviewers: def-au1t Reviewed By: def-au1t Subscribers: palys-swm, Adrian, atul, karol-bisztyga, benschac, yayabosh, def-au1t Differential Revision: https://phabricator.ashoat.com/D3566
129,190
07.04.2022 11:38:59
-7,200
0d5cbefb48f1288b72ed88d729fd266796de144c
[services] Backup - Apply reading log chunk in send log reactor Summary: Depends on D3531 After reading the user id we want to read log chunks Test Plan: backup service build Reviewers: palys-swm, geekbrother, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "diff": "@@ -44,6 +44,14 @@ SendLogReactor::readRequest(backup::SendLogRequest request) {\nthis->state = State::LOG_CHUNK;\nreturn nullptr;\n};\n+ case State::LOG_CHUNK: {\n+ if (!request.has_logdata()) {\n+ throw std::runtime_error(\"log data expected but not received\");\n+ }\n+ std::string chunk = request.logdata();\n+ std::cout << \"log data received \" << chunk << std::endl;\n+ return nullptr;\n+ };\n}\nthrow std::runtime_error(\"send log - invalid state\");\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Apply reading log chunk in send log reactor Summary: Depends on D3531 After reading the user id we want to read log chunks Test Plan: backup service build Reviewers: palys-swm, geekbrother, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3612
129,190
01.04.2022 08:51:00
-7,200
0d2aef2ffe0a7e4b25c32dbf883fd66bb5dedc2a
[services] Backup - Use terminateCallback for create new backup reactor Summary: Depends on D3560 Use termination callback (added in the previous diff) in `CreateNewBackupReactor`. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, jimpo, varun Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/CreateNewBackupReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/CreateNewBackupReactor.h", "diff": "@@ -45,7 +45,7 @@ public:\nstd::unique_ptr<ServerBidiReactorStatus> handleRequest(\nbackup::CreateNewBackupRequest request,\nbackup::CreateNewBackupResponse *response) override;\n- void doneCallback();\n+ void terminateCallback();\n};\nstd::string CreateNewBackupReactor::generateBackupID() {\n@@ -101,7 +101,7 @@ std::unique_ptr<ServerBidiReactorStatus> CreateNewBackupReactor::handleRequest(\nthrow std::runtime_error(\"new backup - invalid state\");\n}\n-void CreateNewBackupReactor::doneCallback() {\n+void CreateNewBackupReactor::terminateCallback() {\nconst std::lock_guard<std::mutex> lock(this->reactorStateMutex);\nif (this->putReactor == nullptr) {\nreturn;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Use terminateCallback for create new backup reactor Summary: Depends on D3560 Use termination callback (added in the previous diff) in `CreateNewBackupReactor`. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, jimpo, varun Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3561
129,184
07.04.2022 11:19:37
14,400
ab4844f485a0147b896579ec1261e5a9dca252c1
[web] Remove unused CSS selectors from `thread-settings-modal.css` Summary: Remove CSS selectors that are obviously unused. Test Plan: IDE would give me a red squiggle in JSX if selector was missing. Reviewers: palys-swm, def-au1t, ashoat Subscribers: Adrian, karol-bisztyga, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/modals/threads/thread-settings-modal.css", "new_path": "web/modals/threads/thread-settings-modal.css", "diff": "@@ -9,19 +9,11 @@ div.modal-body {\ndisplay: flex;\nflex-direction: column;\n}\n-div.resized-modal-body {\n- min-height: 250px;\n-}\ndiv.modal-body p {\npadding: 1px 3px 4px 3px;\nfont-size: 14px;\ntext-align: center;\n}\n-div.modal-body p.form-pre-footer {\n- padding-top: 5px;\n- font-size: 12px;\n- font-style: italic;\n-}\ndiv.modal-body textarea {\nmargin: 3px;\n}\n@@ -30,9 +22,6 @@ div.modal-body textarea {\npadding: 1px;\nwidth: 175px;\n}\n-div.large-modal-container div.modal-body textarea {\n- width: 275px;\n-}\ndiv.modal-body p.confirm-account-password {\nmargin-bottom: 4px;\ncolor: var(--fg);\n@@ -50,9 +39,6 @@ div.modal-body div.form-footer div.modal-form-error {\npadding-left: 6px;\nalign-self: center;\n}\n-div.modal-body div.form-footer div.modal-form-error ol {\n- padding-left: 20px;\n-}\ndiv.modal-body div.form-title {\ndisplay: inline-block;\ntext-align: right;\n@@ -64,9 +50,6 @@ div.modal-body div.form-title {\nwidth: 110px;\ncolor: var(--fg);\n}\n-div.large-modal-container div.modal-body div.form-title {\n- width: 140px;\n-}\ndiv.modal-body div.form-content {\ndisplay: inline-block;\nfont-family: var(--font-stack);\n@@ -75,42 +58,6 @@ div.modal-body div.form-content {\ndiv.modal-body div.form-content input {\nmargin-bottom: 4px;\n}\n-div.modal-body div.form-subtitle {\n- font-size: 12px;\n- padding-left: 4px;\n- font-style: italic;\n-}\n-\n-div.form-text {\n- display: flex;\n- align-items: baseline;\n-}\n-div.form-text > div.form-title {\n- vertical-align: initial;\n- flex-shrink: 0;\n-}\n-div.form-text > div.form-content {\n- margin-left: 3px;\n- margin-bottom: 3px;\n- word-break: break-word;\n-}\n-\n-div.form-text > div.form-float-title {\n- float: left;\n- text-align: right;\n- padding-right: 5px;\n- font-size: 14px;\n- font-weight: 600;\n- width: 110px;\n-}\n-div.form-text > div.form-float-content {\n- white-space: nowrap;\n- overflow: hidden;\n- text-overflow: ellipsis;\n- font-size: 14px;\n- padding: 1px 20px 3px 4px;\n- margin-top: 5px;\n-}\n.italic {\nfont-style: italic;\n@@ -133,14 +80,6 @@ ul.tab-panel > li {\nul.tab-panel > li > a {\ncolor: #555555;\n}\n-ul.tab-panel > li.delete-tab > a {\n- color: #ff0000 !important;\n-}\n-\n-div.user-settings-current-password {\n- padding-top: 4px;\n- margin-top: 5px;\n-}\ndiv.form-textarea-container {\nmargin-top: 1px;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Remove unused CSS selectors from `thread-settings-modal.css` Summary: Remove CSS selectors that are obviously unused. Test Plan: IDE would give me a red squiggle in JSX if selector was missing. Reviewers: palys-swm, def-au1t, ashoat Reviewed By: ashoat Subscribers: Adrian, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3623
129,179
06.04.2022 16:03:35
14,400
7493f1a8982a6252c4de12cf81b51d8fe7191dfd
[web] [fix] calendar hover history + add show on hover Summary: on hover, add and history prompt are now visible {F31678} Test Plan: hover over days on the calendar Reviewers: atul, palys-swm, def-au1t Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/calendar/calendar.css", "new_path": "web/calendar/calendar.css", "diff": "@@ -141,7 +141,7 @@ span.rightActionLinks {\noverflow: hidden;\n}\ndiv.actionLinks svg {\n- fill: gray;\n+ fill: var(--fg);\nwidth: 10px;\nheight: 10px;\n}\n@@ -150,7 +150,7 @@ div.actionLinks svg.history {\ntop: 1px;\n}\ndiv.darkEntry div.actionLinks svg {\n- fill: lightgray;\n+ fill: var(--fg);\n}\ndiv.actionLinks a:hover svg {\nfill: black;\n@@ -162,7 +162,7 @@ div.focusedEntry {\nz-index: 3 !important;\n}\ndiv.actionLinks a {\n- color: gray;\n+ color: var(--fg);\n}\ndiv.actionLinks a:hover {\ncolor: black;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] [ENG-965] calendar hover history + add show on hover Summary: on hover, add and history prompt are now visible https://linear.app/comm/issue/ENG-965/calendar-buttons-only-visible-on-hover {F31678} Test Plan: hover over days on the calendar Reviewers: atul, palys-swm, def-au1t Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3639
129,185
08.04.2022 16:03:16
-7,200
93d5f95888fc080104bffedd07e5c700f9fd3720
[web] Introduce `Subchannels` action in thread menu Summary: Introduce action in thread menu, that launches subchannels modal {F28442} Test Plan: In thread actions menu subchannels action should be available for thread that contain some subchannels Reviewers: palys-swm, benschac, atul Subscribers: ashoat, Adrian, atul, karol-bisztyga, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/chat/thread-menu.react.js", "new_path": "web/chat/thread-menu.react.js", "diff": "@@ -28,6 +28,7 @@ import SidebarListModal from '../modals/chat/sidebar-list-modal.react';\nimport { useModalContext } from '../modals/modal-provider.react';\nimport ConfirmLeaveThreadModal from '../modals/threads/confirm-leave-thread-modal.react';\nimport ThreadMembersModal from '../modals/threads/members/members-modal.react';\n+import SubchannelsModal from '../modals/threads/subchannels/subchannels-modal.react';\nimport ThreadSettingsModal from '../modals/threads/thread-settings-modal.react';\nimport { useSelector } from '../redux/redux-utils';\nimport SWMansionIcon from '../SWMansionIcon.react';\n@@ -117,14 +118,27 @@ function ThreadMenu(props: ThreadMenuProps): React.Node {\nreturn !!childThreads?.some(threadIsChannel);\n}, [childThreads]);\n+ const onClickViewSubchannels = React.useCallback(\n+ () =>\n+ setModal(\n+ <SubchannelsModal threadID={threadInfo.id} onClose={clearModal} />,\n+ ),\n+ [clearModal, setModal, threadInfo.id],\n+ );\n+\nconst viewSubchannelsItem = React.useMemo(() => {\n- if (!hasSubchannels && !canCreateSubchannels) {\n+ if (!hasSubchannels) {\nreturn null;\n}\nreturn (\n- <MenuItem key=\"subchannels\" text=\"Subchannels\" icon=\"message-square\" />\n+ <MenuItem\n+ key=\"subchannels\"\n+ text=\"Subchannels\"\n+ icon=\"message-square\"\n+ onClick={onClickViewSubchannels}\n+ />\n);\n- }, [canCreateSubchannels, hasSubchannels]);\n+ }, [hasSubchannels, onClickViewSubchannels]);\nconst createSubchannelsItem = React.useMemo(() => {\nif (!canCreateSubchannels) {\n@@ -189,7 +203,6 @@ function ThreadMenu(props: ThreadMenuProps): React.Node {\n// TODO: Enable menu items when the modals are implemented\nconst SHOW_NOTIFICATIONS = false;\n- const SHOW_VIEW_SUBCHANNELS = false;\nconst SHOW_CREATE_SUBCHANNELS = false;\nconst items = [\n@@ -197,7 +210,7 @@ function ThreadMenu(props: ThreadMenuProps): React.Node {\nSHOW_NOTIFICATIONS && notificationsItem,\nmembersItem,\nsidebarItem,\n- SHOW_VIEW_SUBCHANNELS && viewSubchannelsItem,\n+ viewSubchannelsItem,\nSHOW_CREATE_SUBCHANNELS && createSubchannelsItem,\nleaveThreadItem && separator,\nleaveThreadItem,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `Subchannels` action in thread menu Summary: Introduce action in thread menu, that launches subchannels modal {F28442} Test Plan: In thread actions menu subchannels action should be available for thread that contain some subchannels Reviewers: palys-swm, benschac, atul Reviewed By: palys-swm Subscribers: ashoat, Adrian, atul, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3602
129,179
11.04.2022 11:42:19
14,400
ee737ed798bf8b057f7ed4c25e5bea456e351031
[lib] [feat] add useIsomorphicLayoutEffect hook Summary: Add useIsomorphicLayoutEffect hook to lib folder Test Plan: N/A it's not used yet. It's an exact copy of useIsomorphicLayoutEffect in `keyserver.react.js` in `landing` Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "ADD", "old_path": null, "new_path": "lib/hooks/isomorphic-layout-effect.react.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+\n+export const useIsomorphicLayoutEffect: typeof React.useEffect =\n+ typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] [feat] add useIsomorphicLayoutEffect hook Summary: Add useIsomorphicLayoutEffect hook to lib folder Test Plan: N/A it's not used yet. It's an exact copy of useIsomorphicLayoutEffect in `keyserver.react.js` in `landing` Reviewers: atul, ashoat Reviewed By: ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3680
129,184
07.04.2022 17:58:39
14,400
f5406d5fa9cf521f8b0cc16975ee9f4ccb7a9159
[web] Introduce `ColorSelectorButton` component with basic styling Summary: Introduce `ColorSelectorButton` component with basic styling. Note: The actual functionality will be introduced in subsequent diffs. Test Plan: Looks as expected (each of the colored circles is a `ColorSelectorButton`): {F32715} Reviewers: palys-swm, def-au1t, benschac Subscribers: Adrian, karol-bisztyga, benschac, yayabosh
[ { "change_type": "ADD", "old_path": null, "new_path": "web/modals/threads/color-selector-button.css", "diff": "+div.container {\n+ height: 48px;\n+ width: 48px;\n+ border-radius: 24px;\n+ cursor: pointer;\n+ align-items: center;\n+ justify-content: center;\n+ display: flex;\n+ transition: 150ms;\n+}\n+\n+div.active,\n+div.container:hover {\n+ background-color: var(--color-selector-active-bg);\n+ transition: 150ms;\n+}\n+\n+div.colorSplotch {\n+ height: 32px;\n+ width: 32px;\n+ border-radius: 16px;\n+ cursor: pointer;\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "web/modals/threads/color-selector-button.react.js", "diff": "+// @flow\n+\n+import classNames from 'classnames';\n+import * as React from 'react';\n+\n+import css from './color-selector-button.css';\n+\n+type ColorSelectorButtonProps = {\n+ +color: string,\n+ +active: boolean,\n+};\n+function ColorSelectorButton(props: ColorSelectorButtonProps): React.Node {\n+ const { color, active } = props;\n+\n+ const containerClassName = classNames(css.container, {\n+ [css.active]: active,\n+ });\n+\n+ const colorSplotchStyle = React.useMemo(\n+ () => ({\n+ backgroundColor: color,\n+ }),\n+ [color],\n+ );\n+\n+ return (\n+ <div className={containerClassName}>\n+ <div className={css.colorSplotch} style={colorSplotchStyle} />\n+ </div>\n+ );\n+}\n+\n+export default ColorSelectorButton;\n" }, { "change_type": "MODIFY", "old_path": "web/theme.css", "new_path": "web/theme.css", "diff": "--label-default-color: var(--shades-white-80);\n--subchannels-modal-color: var(--shades-black-60);\n--subchannels-modal-color-hover: var(--shades-white-100);\n+ --color-selector-active-bg: var(--shades-black-80);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `ColorSelectorButton` component with basic styling Summary: Introduce `ColorSelectorButton` component with basic styling. Note: The actual functionality will be introduced in subsequent diffs. Test Plan: Looks as expected (each of the colored circles is a `ColorSelectorButton`): {F32715} Reviewers: palys-swm, def-au1t, benschac Reviewed By: def-au1t Subscribers: Adrian, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3660
129,184
07.04.2022 18:39:27
14,400
c673fd7cc38903ca5c82dd963e5462d7ffd89a83
[web] Introduce `ColorSelector` component with basic styling Summary: Introduce `ColorSelector` component with basic layout/styling. Note: The actual functionality will be introduced in subsequent diffs. Depends on D3660 Test Plan: Looks as expected: {F32745} Reviewers: palys-swm, def-au1t, benschac Subscribers: Adrian, karol-bisztyga, benschac, yayabosh
[ { "change_type": "ADD", "old_path": null, "new_path": "web/modals/threads/color-selector.css", "diff": "+div.container {\n+ display: flex;\n+ flex-direction: column;\n+ width: 100%;\n+}\n+\n+div.row {\n+ display: flex;\n+ flex-direction: row;\n+ align-items: center;\n+ justify-content: space-between;\n+ width: 100%;\n+ padding: 6px 0;\n+}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "web/modals/threads/color-selector.react.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+\n+import ColorSelectorButton from './color-selector-button.react';\n+import css from './color-selector.css';\n+\n+function ColorSelector(): React.Node {\n+ return (\n+ <div className={css.container}>\n+ <div className={css.row}>\n+ <ColorSelectorButton color=\"#4B87AA\" active={true} />\n+ <ColorSelectorButton color=\"#5C9F5F\" active={false} />\n+ <ColorSelectorButton color=\"#B8753D\" active={false} />\n+ <ColorSelectorButton color=\"#AA4B4B\" active={false} />\n+ <ColorSelectorButton color=\"#6D49AB\" active={false} />\n+ </div>\n+ <div className={css.row}>\n+ <ColorSelectorButton color=\"#C85000\" active={false} />\n+ <ColorSelectorButton color=\"#008F83\" active={false} />\n+ <ColorSelectorButton color=\"#648CAA\" active={false} />\n+ <ColorSelectorButton color=\"#57697F\" active={false} />\n+ <ColorSelectorButton color=\"#575757\" active={false} />\n+ </div>\n+ </div>\n+ );\n+}\n+\n+export default ColorSelector;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `ColorSelector` component with basic styling Summary: Introduce `ColorSelector` component with basic layout/styling. Note: The actual functionality will be introduced in subsequent diffs. --- Depends on D3660 Test Plan: Looks as expected: {F32745} Reviewers: palys-swm, def-au1t, benschac Reviewed By: palys-swm Subscribers: Adrian, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3662
129,184
10.04.2022 21:18:18
14,400
b51b1aa74d0e07ecfdfe33a1cc14a56054c3a758
[web] Rearrange `selectedThreadColorsObj` in `thread-utils` Summary: Change the order of colors in `thread-utils` to match the order that we want in the `ColorSelector` component. Test Plan: Looks as expected. Reviewers: palys-swm, def-au1t, ashoat Subscribers: ashoat, Adrian, karol-bisztyga, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "lib/shared/thread-utils.js", "new_path": "lib/shared/thread-utils.js", "diff": "@@ -83,15 +83,15 @@ function colorIsDark(color: string): boolean {\n}\nconst selectedThreadColorsObj = {\n- 'B8753D': 1,\n- 'C85000': 2,\n- 'AA4B4B': 3,\n- '4B87AA': 4,\n- '648CAA': 5,\n- '57697F': 6,\n- '6D49AB': 7,\n- '00A591': 8,\n- '008F83': 9,\n+ '4B87AA': 1,\n+ '5C9F5F': 2,\n+ 'B8753D': 3,\n+ 'AA4B4B': 4,\n+ '6D49AB': 5,\n+ 'C85000': 6,\n+ '008F83': 7,\n+ '648CAA': 8,\n+ '57697F': 9,\n'575757': 10,\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Rearrange `selectedThreadColorsObj` in `thread-utils` Summary: Change the order of colors in `thread-utils` to match the order that we want in the `ColorSelector` component. Test Plan: Looks as expected. Reviewers: palys-swm, def-au1t, ashoat Reviewed By: ashoat Subscribers: ashoat, Adrian, karol-bisztyga, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3682
129,179
12.04.2022 14:30:26
14,400
81b208556caffba788927b9ae996499ee48194ca
[landing] [feat] add team layout Summary: adds generic layout to match expo.dev Test Plan: layout should generally look the same Reviewers: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "ADD", "old_path": null, "new_path": "landing/team.css", "diff": "+.wrapper {\n+ padding: 16px 0;\n+ margin: 0 auto 48px auto;\n+}\n+\n+.header {\n+ font-family: 'iA Writer Duo S', monospace;\n+ font-weight: 500;\n+ line-height: 1.35;\n+ text-align: center;\n+ --scale: calc(0.75rem + 2vw);\n+ --smallest-font-size: 30px;\n+ --largest-font-size: 50px;\n+ --smallest-padding-size: 32px;\n+ --largest-padding-size: 64px;\n+\n+ padding-bottom: clamp(\n+ var(--smallest-padding-size),\n+ var(--scale),\n+ var(--largest-padding-size)\n+ );\n+\n+ font-size: clamp(\n+ var(--smallest-font-size),\n+ var(--scale),\n+ var(--largest-font-size)\n+ );\n+}\n+\n+.teamWrapper {\n+ transition-property: max-width;\n+ transition: 300ms;\n+ display: flex;\n+ flex-wrap: wrap;\n+ row-gap: 16px;\n+ justify-content: center;\n+ min-width: 320px;\n+ margin: 0 auto;\n+ padding-bottom: 72px;\n+}\n+\n+div.headingContent {\n+ text-align: center;\n+ padding-bottom: 72px;\n+}\n+\n+p.team {\n+ max-width: 60ch;\n+ margin: 0 auto;\n+ padding: 0 16px 36px 16px;\n+ font-size: 1.6rem;\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] [feat] [ENG-353] add team layout Summary: adds generic layout to match expo.dev https://expo.dev/about Test Plan: layout should generally look the same Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3658
129,179
08.04.2022 10:03:40
14,400
ee7f08fabbeb768bc9f7f3b0439185f742e6a975
[landing] [chore] remove isDev flags Summary: remove dev flags Test Plan: works on both production and development Reviewers: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "landing/footer.react.js", "new_path": "landing/footer.react.js", "diff": "@@ -5,8 +5,6 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport * as React from 'react';\nimport { NavLink } from 'react-router-dom';\n-import { isDev } from 'lib/utils/dev-utils';\n-\nimport css from './footer.css';\nimport SubscriptionForm from './subscription-form.react';\n@@ -18,15 +16,6 @@ const navLinkProps = {\n};\nfunction Footer(): React.Node {\n- let teamLink;\n- if (isDev) {\n- teamLink = (\n- <NavLink to=\"/team\" exact {...navLinkProps}>\n- Team\n- </NavLink>\n- );\n- }\n-\nreturn (\n<footer className={css.wrapper}>\n<div className={css.contentWrapper}>\n@@ -40,7 +29,9 @@ function Footer(): React.Node {\n<NavLink to=\"/support\" exact {...navLinkProps}>\nSupport\n</NavLink>\n- {teamLink}\n+ <NavLink to=\"/team\" exact {...navLinkProps}>\n+ Team\n+ </NavLink>\n<NavLink to=\"/terms\" exact {...navLinkProps}>\nTerms of Use\n</NavLink>\n" }, { "change_type": "MODIFY", "old_path": "landing/landing.react.js", "new_path": "landing/landing.react.js", "diff": "import * as React from 'react';\nimport { useRouteMatch } from 'react-router-dom';\n-import { isDev } from 'lib/utils/dev-utils';\n-\nimport AppLanding from './app-landing.react';\nimport Footer from './footer.react';\nimport Header from './header.react';\n@@ -38,7 +36,7 @@ function Landing(): React.Node {\nreturn <Keyservers />;\n} else if (onQR) {\nreturn <QR />;\n- } else if (isDev && onTeam) {\n+ } else if (onTeam) {\nreturn <Team />;\n} else {\nreturn <AppLanding />;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] [chore] remove isDev flags Summary: remove dev flags Test Plan: works on both production and development Reviewers: atul Reviewed By: atul Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3673
129,190
13.04.2022 13:02:43
-7,200
c59027f71a3222939ed28886d317d7d6cbd69dd0
[services] Backup - mind empty attachment holders Summary: Depends on D3583 Use `assignItemFromDatabaseUserIDCreatedIndex` method introduced in the previous diff in the `DatabaseManager`. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, jimpo, varun Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseManager.cpp", "new_path": "services/backup/docker-server/contents/server/src/DatabaseManager.cpp", "diff": "@@ -126,9 +126,11 @@ void DatabaseManager::putLogItem(const LogItem &item) {\nrequest.AddItem(\nLogItem::FIELD_VALUE,\nAws::DynamoDB::Model::AttributeValue(item.getValue()));\n+ if (!item.getAttachmentHolders().empty()) {\nrequest.AddItem(\nLogItem::FIELD_ATTACHMENT_HOLDERS,\nAws::DynamoDB::Model::AttributeValue(item.getAttachmentHolders()));\n+ }\nthis->innerPutItem(std::make_shared<LogItem>(item), request);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - mind empty attachment holders Summary: Depends on D3583 Use `assignItemFromDatabaseUserIDCreatedIndex` method introduced in the previous diff in the `DatabaseManager`. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother, jimpo, varun Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3585
129,190
07.04.2022 16:47:14
-7,200
13281b52060f4154e70ad12cdb78f86d29d0e0a5
[services] Backup - Send log - add store in database Summary: Depends on D3585 Add logic for storing the log data in the database. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, jimpo, varun, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "diff": "@@ -31,9 +31,14 @@ class SendLogReactor : public ServerReadReactorBase<\nState state = State::USER_ID;\nPersistenceMethod persistenceMethod = PersistenceMethod::UNKNOWN;\nstd::string userID;\n+ std::string backupID;\n+ // either the value itself which is a dump of a single operation (if\n+ // `persistedInBlob` is false) or the holder to blob (if `persistedInBlob` is\n+ // true)\n+ std::string value;\n- void storeInDatabase(const std::string &data) {\n- }\n+ void storeInDatabase();\n+ std::string generateLogID();\nvoid storeInBlob(const std::string &data) {\n}\n@@ -47,6 +52,22 @@ public:\nvoid doneCallback() override;\n};\n+void SendLogReactor::storeInDatabase() {\n+ // TODO handle attachment holders\n+ database::LogItem logItem(\n+ this->backupID,\n+ this->generateLogID(),\n+ (this->persistenceMethod == PersistenceMethod::BLOB),\n+ this->value,\n+ {});\n+ database::DatabaseManager::getInstance().putLogItem(logItem);\n+}\n+\n+std::string SendLogReactor::generateLogID() {\n+ // TODO replace mock\n+ return generateRandomString();\n+}\n+\nstd::unique_ptr<grpc::Status>\nSendLogReactor::readRequest(backup::SendLogRequest request) {\nswitch (this->state) {\n@@ -71,7 +92,8 @@ SendLogReactor::readRequest(backup::SendLogRequest request) {\nif (chunk->size() <= LOG_DATA_SIZE_DATABASE_LIMIT) {\nif (this->persistenceMethod == PersistenceMethod::UNKNOWN) {\nthis->persistenceMethod = PersistenceMethod::DB;\n- this->storeInDatabase(*chunk);\n+ this->value = std::move(*chunk);\n+ this->storeInDatabase();\n} else if (this->persistenceMethod == PersistenceMethod::BLOB) {\nthis->storeInBlob(*chunk);\n} else {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Send log - add store in database Summary: Depends on D3585 Add logic for storing the log data in the database. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, jimpo, varun, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3586
129,190
07.04.2022 16:47:17
-7,200
423e9137192f8736d2d85143e22e6b82d42f996d
[services] Backup - Send log - initialize put reactor method Summary: Depends on D3586 Adding a method called `initializePutReactor` for initializing the put client reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "diff": "#include \"Constants.h\"\n#include \"ServerReadReactorBase.h\"\n+#include \"ServiceBlobClient.h\"\n#include \"../_generated/backup.grpc.pb.h\"\n#include \"../_generated/backup.pb.h\"\n@@ -32,13 +33,18 @@ class SendLogReactor : public ServerReadReactorBase<\nPersistenceMethod persistenceMethod = PersistenceMethod::UNKNOWN;\nstd::string userID;\nstd::string backupID;\n+ std::string hash;\n// either the value itself which is a dump of a single operation (if\n// `persistedInBlob` is false) or the holder to blob (if `persistedInBlob` is\n// true)\nstd::string value;\n+ std::condition_variable blobDoneCV;\n+ std::shared_ptr<reactor::BlobPutClientReactor> putReactor;\n+ ServiceBlobClient blobClient;\nvoid storeInDatabase();\nstd::string generateLogID();\n+ void initializePutReactor();\nvoid storeInBlob(const std::string &data) {\n}\n@@ -68,6 +74,22 @@ std::string SendLogReactor::generateLogID() {\nreturn generateRandomString();\n}\n+void SendLogReactor::initializePutReactor() {\n+ if (this->value.empty()) {\n+ throw std::runtime_error(\n+ \"put reactor cannot be initialized with empty value\");\n+ }\n+ if (this->hash.empty()) {\n+ throw std::runtime_error(\n+ \"put reactor cannot be initialized with empty hash\");\n+ }\n+ if (this->putReactor == nullptr) {\n+ this->putReactor = std::make_shared<reactor::BlobPutClientReactor>(\n+ this->value, this->hash, &this->blobDoneCV);\n+ this->blobClient.put(this->putReactor);\n+ }\n+}\n+\nstd::unique_ptr<grpc::Status>\nSendLogReactor::readRequest(backup::SendLogRequest request) {\nswitch (this->state) {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Send log - initialize put reactor method Summary: Depends on D3586 Adding a method called `initializePutReactor` for initializing the put client reactor Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3646
129,190
07.04.2022 16:47:22
-7,200
6fd6264896255fadf54ad5543f1557731324eaea
[services] Backup - Send log - add reactor state mutex Summary: Depends on D3647 Adding a mutex for reactor's methods. The reason for this is explained in the comments. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/SendLogReactor.h", "diff": "@@ -40,6 +40,7 @@ class SendLogReactor : public ServerReadReactorBase<\n// `persistedInBlob` is false) or the holder to blob (if `persistedInBlob` is\n// true)\nstd::string value;\n+ std::mutex reactorStateMutex;\nstd::condition_variable blobDoneCV;\nstd::shared_ptr<reactor::BlobPutClientReactor> putReactor;\n@@ -94,6 +95,9 @@ void SendLogReactor::initializePutReactor() {\nstd::unique_ptr<grpc::Status>\nSendLogReactor::readRequest(backup::SendLogRequest request) {\n+ // we make sure that the blob client's state is flushed to the main memory\n+ // as there may be multiple threads from the pool taking over here\n+ const std::lock_guard<std::mutex> lock(this->reactorStateMutex);\nswitch (this->state) {\ncase State::USER_ID: {\nif (!request.has_userid()) {\n@@ -150,6 +154,9 @@ SendLogReactor::readRequest(backup::SendLogRequest request) {\n}\nvoid SendLogReactor::doneCallback() {\n+ // we make sure that the blob client's state is flushed to the main memory\n+ // as there may be multiple threads from the pool taking over here\n+ const std::lock_guard<std::mutex> lock(this->reactorStateMutex);\n// TODO implement\nstd::cout << \"receive logs done \" << this->status.error_code() << \"/\"\n<< this->status.error_message() << std::endl;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Send log - add reactor state mutex Summary: Depends on D3647 Adding a mutex for reactor's methods. The reason for this is explained in the comments. Test Plan: ``` cd services yarn run-backup-service ``` Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3648
129,190
07.04.2022 16:47:36
-7,200
a122d984366560cac0f15c87bd6ae42a09bde288
[services] Blob - Fix test name for storage manager tests Summary: Depends on D3594 This name was just wrong Test Plan: ``` cd services yarn test-blob-service ``` still works Reviewers: geekbrother, palys-swm, varun, jimpo Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/blob/test/StorageManagerTest.cpp", "new_path": "services/blob/test/StorageManagerTest.cpp", "diff": "using namespace comm::network;\n-class AWSToolsTest : public testing::Test {\n+class StorageManagerTest : public testing::Test {\npublic:\nprotected:\nconst std::string bucketName = \"commapp-test\";\n@@ -29,7 +29,7 @@ protected:\n}\n};\n-TEST_F(AWSToolsTest, ObjectOperationsTest) {\n+TEST_F(StorageManagerTest, ObjectOperationsTest) {\nEXPECT_TRUE(getBucket(bucketName).isAvailable());\nstd::string objectName = createObject(getBucket(bucketName));\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Blob - Fix test name for storage manager tests Summary: Depends on D3594 This name was just wrong Test Plan: ``` cd services yarn test-blob-service ``` still works Reviewers: geekbrother, palys-swm, varun, jimpo Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3596
129,190
13.04.2022 14:10:47
-7,200
ffec9cf8362a18fba086ba9554d5e5a01e0c3d7e
[services] Backup - Add blob get client reactor Summary: Depends on D3627 Adding blob client reactor for `get` operation. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/client/blob/BlobGetClientReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/client/blob/BlobGetClientReactor.h", "diff": "#pragma once\n#include \"ClientReadReactorBase.h\"\n-#include \"Constants.h\"\n#include \"../_generated/blob.grpc.pb.h\"\n#include \"../_generated/blob.pb.h\"\n#include <folly/MPMCQueue.h>\n#include <grpcpp/grpcpp.h>\n-#include <condition_variable>\n-#include <iostream>\n#include <memory>\n#include <string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add blob get client reactor Summary: Depends on D3627 Adding blob client reactor for `get` operation. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3629
129,190
07.04.2022 16:47:53
-7,200
fb2954458f3350c3295fa355749253cec91da24e
[services] Backup - Implement get method in service blob client Summary: Depends on D3630 Just calling `Get` method in `ServiceBlobClient` Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/grpc-client/ServiceBlobClient.h", "new_path": "services/backup/docker-server/contents/server/src/grpc-client/ServiceBlobClient.h", "diff": "#pragma once\n+#include \"BlobGetClientReactor.h\"\n#include \"BlobPutClientReactor.h\"\n#include \"../_generated/blob.grpc.pb.h\"\n@@ -34,7 +35,16 @@ public:\nthis->stub->async()->Put(&putReactor->context, &(*putReactor));\nputReactor->nextWrite();\n}\n- // void get(const std::string &holder);\n+\n+ void get(std::shared_ptr<reactor::BlobGetClientReactor> getReactor) {\n+ if (getReactor == nullptr) {\n+ throw std::runtime_error(\n+ \"get reactor is being used but has not been initialized\");\n+ }\n+ this->stub->async()->Get(\n+ &getReactor->context, &getReactor->request, &(*getReactor));\n+ getReactor->start();\n+ }\n// void remove(const std::string &holder);\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Implement get method in service blob client Summary: Depends on D3630 Just calling `Get` method in `ServiceBlobClient` Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3632
129,190
07.04.2022 16:47:56
-7,200
56ca2282dde43f8eddcb7d27d793179a8a6ba902
[services] Backup - pull backup reactor - initialize get reactor Summary: Depends on D3632 Adding basic structure for `PullBackupReactor` as well as the logic for `initializeGetReactor`. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h", "diff": "#pragma once\n+#include \"BlobGetClientReactor.h\"\n+#include \"DatabaseManager.h\"\n#include \"ServerWriteReactorBase.h\"\n+#include \"ServiceBlobClient.h\"\n#include \"../_generated/backup.grpc.pb.h\"\n#include \"../_generated/backup.pb.h\"\n+#include <folly/MPMCQueue.h>\n+\n#include <iostream>\n#include <memory>\n#include <string>\n@@ -16,19 +21,56 @@ namespace reactor {\nclass PullBackupReactor : public ServerWriteReactorBase<\nbackup::PullBackupRequest,\nbackup::PullBackupResponse> {\n+\n+ enum class State {\n+ COMPACTION = 1,\n+ LOGS = 2,\n+ };\n+\n+ std::shared_ptr<database::BackupItem> backupItem;\n+ std::shared_ptr<reactor::BlobGetClientReactor> getReactor;\n+ std::shared_ptr<folly::MPMCQueue<std::string>> dataChunks;\n+ ServiceBlobClient blobClient;\n+ State state = State::COMPACTION;\n+\n+ void initializeGetReactor(const std::string &holder);\n+\npublic:\n- using ServerWriteReactorBase<\n- backup::PullBackupRequest,\n- backup::PullBackupResponse>::ServerWriteReactorBase;\n+ PullBackupReactor(const backup::PullBackupRequest *request);\n+\n+ void initialize() override;\nstd::unique_ptr<grpc::Status>\nwriteResponse(backup::PullBackupResponse *response) override;\n};\n+PullBackupReactor::PullBackupReactor(const backup::PullBackupRequest *request)\n+ : ServerWriteReactorBase<\n+ backup::PullBackupRequest,\n+ backup::PullBackupResponse>(request),\n+ dataChunks(std::make_shared<folly::MPMCQueue<std::string>>(100)) {\n+}\n+\n+void PullBackupReactor::initializeGetReactor(const std::string &holder) {\n+ if (this->backupItem == nullptr) {\n+ throw std::runtime_error(\n+ \"get reactor cannot be initialized when backup item is missing\");\n+ }\n+ if (this->getReactor == nullptr) {\n+ this->getReactor = std::make_shared<reactor::BlobGetClientReactor>(\n+ holder, this->dataChunks);\n+ this->getReactor->request.set_holder(holder);\n+ this->blobClient.get(this->getReactor);\n+ }\n+}\n+\n+void PullBackupReactor::initialize() {\n+ throw std::runtime_error(\"unimplemented\");\n+}\n+\nstd::unique_ptr<grpc::Status>\nPullBackupReactor::writeResponse(backup::PullBackupResponse *response) {\n- // TODO handle request\n- return std::make_unique<grpc::Status>(grpc::Status(grpc::StatusCode::UNIMPLEMENTED, \"unimplemented\"));\n+ throw std::runtime_error(\"unimplemented\");\n}\n} // namespace reactor\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - pull backup reactor - initialize get reactor Summary: Depends on D3632 Adding basic structure for `PullBackupReactor` as well as the logic for `initializeGetReactor`. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3633
129,190
07.04.2022 16:50:52
-7,200
c593d0fa82e55252bd451f653d13e2fb4a1f55a4
[services] Backup - pull backup reactor - compaction - initialize Summary: Depends on D3633 Adding logic for the `initialize` method. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h", "diff": "@@ -29,6 +29,7 @@ class PullBackupReactor : public ServerWriteReactorBase<\nstd::shared_ptr<database::BackupItem> backupItem;\nstd::shared_ptr<reactor::BlobGetClientReactor> getReactor;\n+ std::mutex reactorStateMutex;\nstd::shared_ptr<folly::MPMCQueue<std::string>> dataChunks;\nServiceBlobClient blobClient;\nState state = State::COMPACTION;\n@@ -65,7 +66,24 @@ void PullBackupReactor::initializeGetReactor(const std::string &holder) {\n}\nvoid PullBackupReactor::initialize() {\n- throw std::runtime_error(\"unimplemented\");\n+ // we make sure that the blob client's state is flushed to the main memory\n+ // as there may be multiple threads from the pool taking over here\n+ const std::lock_guard<std::mutex> lock(this->reactorStateMutex);\n+ if (this->request.userid().empty()) {\n+ throw std::runtime_error(\"no user id provided\");\n+ }\n+ if (this->request.backupid().empty()) {\n+ throw std::runtime_error(\"no backup id provided\");\n+ }\n+ this->backupItem = database::DatabaseManager::getInstance().findBackupItem(\n+ this->request.userid(), this->request.backupid());\n+ if (this->backupItem == nullptr) {\n+ throw std::runtime_error(\n+ \"no backup found for provided parameters: user id [\" +\n+ this->request.userid() + \"], backup id [\" + this->request.backupid() +\n+ \"]\");\n+ }\n+ // TODO get logs\n}\nstd::unique_ptr<grpc::Status>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - pull backup reactor - compaction - initialize Summary: Depends on D3633 Adding logic for the `initialize` method. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3637
129,190
07.04.2022 16:50:55
-7,200
bf058231b3dfc55cbefa80225301ae87ff71d70b
[services] Backup - pull backup reactor - compaction - write response Summary: Depends on D3637 The logic for `writeResponse` handling writing compaction chunks Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h", "new_path": "services/backup/docker-server/contents/server/src/Reactors/server/PullBackupReactor.h", "diff": "@@ -88,8 +88,29 @@ void PullBackupReactor::initialize() {\nstd::unique_ptr<grpc::Status>\nPullBackupReactor::writeResponse(backup::PullBackupResponse *response) {\n+ // we make sure that the blob client's state is flushed to the main memory\n+ // as there may be multiple threads from the pool taking over here\n+ const std::lock_guard<std::mutex> lock(this->reactorStateMutex);\n+ switch (this->state) {\n+ case State::COMPACTION: {\n+ this->initializeGetReactor(this->backupItem->getCompactionHolder());\n+ std::string dataChunk;\n+ this->dataChunks->blockingRead(dataChunk);\n+ if (dataChunk.empty()) {\n+ // TODO try to immediately start writing logs instead of wasting a cycle\n+ // sending nothing\n+ this->state = State::LOGS;\n+ return nullptr;\n+ }\n+ response->set_compactionchunk(dataChunk);\n+ return nullptr;\n+ }\n+ case State::LOGS: {\nthrow std::runtime_error(\"unimplemented\");\n}\n+ }\n+ throw std::runtime_error(\"unhandled state\");\n+}\n} // namespace reactor\n} // namespace network\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - pull backup reactor - compaction - write response Summary: Depends on D3637 The logic for `writeResponse` handling writing compaction chunks Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3634
129,190
07.04.2022 16:50:58
-7,200
797df3207b7f7748d35e75c46b2cc8fd71abe921
[services] Backup - Log item - handle lack of attachment holders Summary: Depends on D3634 Handle a case when the log item does not have attachment holders. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh
[ { "change_type": "MODIFY", "old_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.cpp", "new_path": "services/backup/docker-server/contents/server/src/DatabaseEntities/LogItem.cpp", "diff": "@@ -56,8 +56,11 @@ void LogItem::assignItemFromDatabase(const AttributeValues &itemFromDB) {\nstd::string(itemFromDB.at(LogItem::FIELD_PERSISTED_IN_BLOB).GetS())\n.c_str());\nthis->value = itemFromDB.at(LogItem::FIELD_VALUE).GetS();\n- this->attachmentHolders =\n- itemFromDB.at(LogItem::FIELD_ATTACHMENT_HOLDERS).GetSS();\n+ auto attachmentsHolders =\n+ itemFromDB.find(LogItem::FIELD_ATTACHMENT_HOLDERS);\n+ if (attachmentsHolders != itemFromDB.end()) {\n+ this->attachmentHolders = attachmentsHolders->second.GetSS();\n+ }\n} catch (std::logic_error &e) {\nthrow std::runtime_error(\n\"invalid log item provided, \" + std::string(e.what()));\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Log item - handle lack of attachment holders Summary: Depends on D3634 Handle a case when the log item does not have attachment holders. Test Plan: The same as in D3535 Reviewers: palys-swm, geekbrother Reviewed By: palys-swm Subscribers: ashoat, palys-swm, Adrian, atul, benschac, yayabosh Differential Revision: https://phabricator.ashoat.com/D3635
129,179
13.04.2022 08:40:35
14,400
53e27e650642e99432e2aaf6606bd7d3dcd478d8
[web] [fix] replace useLayoutEffect with useEffect Summary: useLayoutEffect isn't needed here Test Plan: open and close the menu button in header Reviewers: atul, def-au1t, palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "web/components/menu.react.js", "new_path": "web/components/menu.react.js", "diff": "@@ -58,11 +58,7 @@ function Menu(props: MenuProps): React.Node {\nreturn () => window.removeEventListener('resize', updatePosition);\n}, [updatePosition]);\n- // useLayoutEffect is necessary so that the menu position is immediately\n- // updated in the first render of component\n- React.useLayoutEffect(() => {\n- updatePosition();\n- }, [updatePosition]);\n+ React.useEffect(updatePosition, [updatePosition]);\nconst closeMenuCallback = React.useCallback(() => {\ncloseMenu(menuActionList);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [fix] [ENG-986] replace useLayoutEffect with useEffect Summary: useLayoutEffect isn't needed here https://linear.app/comm/issue/ENG-986/regression-uselayouteffect-warning-in-keyserver-console Test Plan: open and close the menu button in header Reviewers: atul, def-au1t, palys-swm Reviewed By: def-au1t, palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3678
129,179
13.04.2022 08:43:46
14,400
9eff5619b3223f1f630f9dcf22b31c7747d23f67
[web] [refactor] use lib useIsomorphicLayoutEffect Summary: replace `useIsomorphicLayoutEffect` and React.useLayout effect with lib Test Plan: console error shouldn't exist anymore from layout effect. Keyserver and menu button work as expected Reviewers: atul, def-au1t, palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh
[ { "change_type": "MODIFY", "old_path": "landing/keyservers.react.js", "new_path": "landing/keyservers.react.js", "diff": "import { create } from '@lottiefiles/lottie-interactivity';\nimport * as React from 'react';\n+import { useIsomorphicLayoutEffect } from 'lib/hooks/isomorphic-layout-effect.react';\n+\nimport { assetsCacheURLPrefix } from './asset-meta-data';\nimport css from './keyservers.css';\nimport ReadDocsButton from './read-docs-btn.react';\nimport StarBackground from './star-background.react';\n-const useIsomorphicLayoutEffect =\n- typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n-\nfunction Keyservers(): React.Node {\nReact.useEffect(() => {\nimport('@lottiefiles/lottie-player');\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] [refactor] [ENG-986] use lib useIsomorphicLayoutEffect Summary: replace `useIsomorphicLayoutEffect` and React.useLayout effect with lib Test Plan: console error shouldn't exist anymore from layout effect. Keyserver and menu button work as expected Reviewers: atul, def-au1t, palys-swm Reviewed By: def-au1t, palys-swm Subscribers: ashoat, palys-swm, Adrian, karol-bisztyga, yayabosh Differential Revision: https://phabricator.ashoat.com/D3681