-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ Bug ] Removed emojis from the app #40
Conversation
Signed-off-by: brf153 <[email protected]>
Find it here @brf153 Can you open up the Modal |
@Nabhag8848 I have removed the emojis from the i18n files. Still the emoji is there in the menu dropdown |
Refresh Rocketchat it will not show up anymore. |
|
I think I have removed all the emojis |
edited this check: i meant |
|
Feature 5 under Demo: https://github.com/Nabhag8848/Google-Summer-of-Code See those two videos on that same modal when we select Page, Modal doesn't change to include other components as when we select page it is meant to create subpage within notion but in case when we select db ( option with pile of books 📚 it will update the modal to include other components as it this time it is meant to create record or row in a notion table. if there are no emojis how we can differentiate if its a table or page? thats the issue. |
Oki so, should I add the page emoji in front of pages and books emoji in front of database? |
|
Signed-off-by: brf153 <[email protected]>
@Nabhag8848 I have added emoji:boolean in the function which will check whether the emoji needs to be rendered or not |
@Nabhag8848 is something left to be done? |
Will review and test on my end and will let you know. |
Oki |
@brf153
|
@Nabhag8848 I will fix this right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made Some Changes Comments.
README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- oops, i believe you removed from documentation which is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I add the emojis in the documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, revert changes of docs.
enum/OAuth2.ts
Outdated
NOT_CONNECTED_MESSAGE = `👋 You are not connected to **Workspace**!`, | ||
NOT_CONNECTED_MESSAGE_WITH_INFO = `👋 Connect to workspace to access \`pages\` & \`database\``, | ||
NOT_CONNECTED_MESSAGE = `You are not connected to **Workspace**!`, | ||
NOT_CONNECTED_MESSAGE_WITH_INFO = `Connect to workspace to access \`pages\` & \`database\``, | ||
CONNECT_TO_WORKSPACE = "Connect to Workspace", | ||
CREDENTIALS_MISSING_USER = `🚫 Something Went Wrong, Please Contact the Admin!`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove 🚫
src/endpoints/webhook.ts
Outdated
@@ -113,7 +113,7 @@ export class WebHookEndpoint extends ApiEndpoint { | |||
const successTemplate = getAuthPageTemplate( | |||
"Connected to Workspace", | |||
OAuth2Content.success, | |||
`👋 Connected to ${response.workspace_name}❗`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add 👋 as it is AuthPageTemplate as we discussed earlier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oki
@@ -387,7 +387,7 @@ export class ExecuteViewSubmitHandler { | |||
message = `🚫 Something went wrong while creating page in **${workspace_name}**.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove 🚫. there are several others in same file remove all of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will try to remove it from wherever it is required. I don't know why but my vs code search does not show any data when I search for "🚫"
src/lib/NotionSDK.ts
Outdated
} | ||
|
||
return null; | ||
} | ||
|
||
private returnPage(name: string, page_id: string): IPage { | ||
private returnPage(name: string, page_id: string, emoji: boolean): IPage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make emoji parameter default value as false to avoid passing when we don't need emojis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oki
src/lib/NotionSDK.ts
Outdated
@@ -540,7 +541,7 @@ export class NotionSDK implements INotionSDK { | |||
} | |||
} | |||
|
|||
private async getDatabaseObjectFromResults(item): Promise<IDatabase> { | |||
private async getDatabaseObjectFromResults(item, emoji:boolean): Promise<IDatabase> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: Emoji default value as false and make necessary changes whereever you are calling this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oki
… and IDatabase in createPage and createRecord Signed-off-by: brf153 <[email protected]>
Signed-off-by: brf153 <[email protected]>
Signed-off-by: brf153 <[email protected]>
@Nabhag8848 I have made the changes |
Signed-off-by: brf153 <[email protected]>
WhatsApp.Video.2024-01-23.at.13.32.46.mp4 |
Signed-off-by: brf153 <[email protected]>
const newDatabase = { | ||
...database, | ||
info: { | ||
name: database.info.name.replace("📚 ",""), | ||
link: database.info.link, | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe, you overriding this due to when sending message to channel it was showing 📚. can't directly we can have const databasename = info.name.replace("📚","");
in line 504
. mention below. so we don't need to have this newDatabase
object
const newDatabase = { | |
...database, | |
info: { | |
name: database.info.name.replace("📚 ",""), | |
link: database.info.link, | |
}, | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is better. I am making the changes.
await sendNotification(this.read, this.modify, user, room, { | ||
message, | ||
}); | ||
} else { | ||
const { info } = database; | ||
const { info } = newDatabase; | ||
const databasename = info.name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, as i mentioned above.
const databasename = info.name; | |
const databasename = info.name.replace("📚 ",""); |
@@ -15,6 +15,7 @@ export function getSelectDatabaseLayout( | |||
|
|||
const database_name = properties.name; | |||
const database_url = properties.link; | |||
const databaseNameWithoutEmoji = database_name.replace("📚 ", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can directly replace emoji in database_name
variable to avoid creating new variable.
line 16: const database_name = properties.name.replace("📚 ", "");
const databaseNameWithoutEmoji = database_name.replace("📚 ", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad
src/lib/NotionSDK.ts
Outdated
@@ -989,7 +991,8 @@ export class NotionSDK implements INotionSDK { | |||
|
|||
const pageInfo = response.data; | |||
const page = (await this.getPageObjectFromResults( | |||
pageInfo | |||
pageInfo, | |||
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Previously we made a emoji param default value false so that we don't need to pass it when its false, remove from every calls where it is false. there are at several other places.
false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oki making the changes
src/lib/NotionSDK.ts
Outdated
@@ -132,7 +132,7 @@ export class NotionSDK implements INotionSDK { | |||
} | |||
} | |||
|
|||
private async getPageObjectFromResults(item): Promise<IPage | null> { | |||
private async getPageObjectFromResults(item, emoji:boolean=false): Promise<IPage | null> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you are making changes in this file with suggestions, make a indentation with other methods too which has default value of emoji.
private async getPageObjectFromResults(item, emoji:boolean=false): Promise<IPage | null> { | |
private async getPageObjectFromResults(item, emoji:boolean = false): Promise<IPage | null> { |
src/lib/NotionSDK.ts
Outdated
const { name, parent } = page; | ||
const { title } = prop; | ||
const nameWithoutEmoji = name.replace("📄", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can avoid long variable name here, make neccessary changes which would affect this below.
const { name, parent } = page; | |
const { title } = prop; | |
const nameWithoutEmoji = name.replace("📄", ""); | |
const { parent } = page; | |
const { title } = prop; | |
const name = page.name.replace("📄", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oki
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brf153 Good work! Few More Changes, Hope those comments help you in future PRs.
Signed-off-by: brf153 <[email protected]>
@Nabhag8848 Thank you for your detailed feedback and comments! I appreciate the guidance, and I'll make sure to incorporate these changes in my future PRs. Also, I have made the required changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @brf153 remove console.log, and follow along other comments.
await sendNotification(this.read, this.modify, user, room, { | ||
message, | ||
}); | ||
} else { | ||
const { info } = database; | ||
const databasename = info.name; | ||
const databasename = info.name.replace("📚 ", ""); | ||
console.log("databaseName ", databasename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console.log
console.log("databaseName ", databasename) |
src/lib/NotionSDK.ts
Outdated
} | ||
|
||
return null; | ||
} | ||
|
||
private returnPage(name: string, page_id: string): IPage { | ||
private returnPage(name: string, page_id: string, emoji: boolean=false): IPage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private returnPage(name: string, page_id: string, emoji: boolean=false): IPage { | |
private returnPage(name: string, page_id: string, emoji: boolean = false): IPage { |
src/lib/NotionSDK.ts
Outdated
@@ -597,7 +599,7 @@ export class NotionSDK implements INotionSDK { | |||
|
|||
let result: INotionPage = { | |||
link: response?.data?.url, | |||
name, | |||
name: name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name: name, | |
name, |
Signed-off-by: brf153 <[email protected]>
@Nabhag8848 made the changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @brf153 !! 🚀
Hey @brf153 , I am not sure what is causing it, but after this merge has been completed, I am noticing a thin line over the dropdown that is flickering while typing something. I'm not sure what is causing this issue. I saw your code, and I wasn't able to figure out what is causing the issue, so I am just letting you know that this is happening. If you can figure out what might be causing it, you can fix it. I tried reverting your changes and then that thin line disappeared, so i feel some changes might be causing this. Note: I am experiencing the issue only in Microsoft Edge browser in Ubuntu 22.0, I tried using other browsers, and it was working fine. However after reverting the commit, in Edge also, there is no such line. |
@Spiral-Memory I don't have it bro |
Can you check it in dark mode in the Microsoft edge browser ? |
Issue(s)
closes #37
Acceptance Criteria fulfillment
Proposed changes (including videos or screenshots)
WhatsApp.Video.2024-01-19.at.19.14.29.mp4
Further comments
@Nabhag8848 I could not get the code for the "more" dropdown menu.