Skip to content
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

CC-1296 add refresh from github button #1867

Merged
merged 8 commits into from
Jun 21, 2024

Conversation

libmartinito
Copy link
Contributor

@libmartinito libmartinito commented Jun 18, 2024

Checklist:

  • I've thoroughly self-reviewed my changes
  • I've added tests for my changes, unless they affect admin-only areas (or are otherwise not worth testing)
  • I've verified any visual changes using Percy (add a commit with [percy] in the message to trigger)

Summary by CodeRabbit

  • New Features

    • Added a tooltip for syncing GitHub account username.
    • Enabled the refresh button functionality to update the username from GitHub.
  • Bug Fixes

    • Improved GitHub username synchronization mechanism.
  • Tests

    • Added tests to verify the functionality of refreshing GitHub usernames.

Copy link

linear bot commented Jun 18, 2024

Copy link
Contributor

coderabbitai bot commented Jun 18, 2024

Walkthrough

The changes introduce a new feature to sync the GitHub username in the profile settings section of an app. This enhancement includes updates to the tooltip text, a new refresh button to update the username, and corresponding backend changes to support this functionality, including a new route and user model method. Additionally, tests were adjusted to verify the new feature.

Changes

Files Summary
app/components/settings/profile-page/username-section.hbs Updated tooltip text and enabled refresh button functionality for syncing GitHub username.
app/components/settings/profile-page/username-section.ts Added authenticator service, tracking variable, and async action method for refreshing GitHub username.
app/models/user.ts Added syncUsernameFromGitHub method and adjusted syncFeatureFlags method implementation.
mirage/handlers/users.js Added new route POST /users/:id/sync-username-from-github for updating and returning the user's username.
tests/acceptance/settings-page/profile-test.js, tests/pages/settings/profile-page.ts Added import of { settled }, and test to check refreshing GitHub username functionality.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI as UI Component
    participant BE as Backend
    participant GH as GitHub

    User->>UI: Click Refresh Button
    UI->>UI: Invoke refreshFromGitHub action
    UI->>BE: POST /users/:id/sync-username-from-github
    BE->>GH: Get new username from GitHub
    GH-->>BE: Return updated username
    BE-->>UI: Return updated user object with new username
    UI-->>User: Display updated username in UI
Loading

Poem

In the realm where codes reside,
A button gleams with newfound pride.
Sync your name from GitHub's nest,
Updating fast, it's quite the best.
Tests and routes ensure the flow,
Hail to changes, watch them grow!
✨🐇✨


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Jun 18, 2024

Bundle Report

Changes will decrease total bundle size by 178.5kB ⬇️

Bundle name Size Change
client-array-push 26.02MB 178.5kB ⬇️

Copy link

github-actions bot commented Jun 18, 2024

Test Results

  1 files  ±0    1 suites  ±0   9m 46s ⏱️ - 1m 38s
539 tests  - 2  504 ✅ +2  35 💤 ±0  0 ❌ ±0 
554 runs   - 2  519 ✅ +6  35 💤 ±0  0 ❌  - 4 

Results for commit 9518266. ± Comparison against base commit 1168121.

This pull request removes 541 and adds 539 tests. Note that renamed tests count towards both.
Chrome 125.0 ‑ Acceptance | Meta tags: it has custom meta image when visiting a collection
Chrome 125.0 ‑ Acceptance | Meta tags: it has custom meta image when visiting a course page
Chrome 125.0 ‑ Acceptance | Meta tags: it has custom meta image when visiting a track page
Chrome 125.0 ‑ Acceptance | Meta tags: it has default meta image when visiting /catalog
Chrome 125.0 ‑ Acceptance | affiliate-link-page | accept-referral-offer: accepting referral offer when not logged in redirects to login
Chrome 125.0 ‑ Acceptance | affiliate-link-page | accept-referral-offer: can accept referral offer
Chrome 125.0 ‑ Acceptance | affiliate-link-page | view-affiliate-link: can view affiliate link when logged in
Chrome 125.0 ‑ Acceptance | affiliate-link-page | view-affiliate-link: can view affiliate link when not logged in
Chrome 125.0 ‑ Acceptance | affiliate-link-page | view-affiliate-link: redirects to not found if affiliate link is invalid
Chrome 125.0 ‑ Acceptance | affiliate-page | initiate-payout: can initiate payout
…
Chrome 126.0 ‑ Acceptance | Meta tags: it has custom meta image when visiting a collection
Chrome 126.0 ‑ Acceptance | Meta tags: it has custom meta image when visiting a course page
Chrome 126.0 ‑ Acceptance | Meta tags: it has custom meta image when visiting a track page
Chrome 126.0 ‑ Acceptance | Meta tags: it has default meta image when visiting /catalog
Chrome 126.0 ‑ Acceptance | affiliate-link-page | accept-referral-offer: accepting referral offer when not logged in redirects to login
Chrome 126.0 ‑ Acceptance | affiliate-link-page | accept-referral-offer: can accept referral offer
Chrome 126.0 ‑ Acceptance | affiliate-link-page | view-affiliate-link: can view affiliate link when logged in
Chrome 126.0 ‑ Acceptance | affiliate-link-page | view-affiliate-link: can view affiliate link when not logged in
Chrome 126.0 ‑ Acceptance | affiliate-link-page | view-affiliate-link: redirects to not found if affiliate link is invalid
Chrome 126.0 ‑ Acceptance | affiliate-page | initiate-payout: can initiate payout
…
This pull request removes 35 skipped tests and adds 35 skipped tests. Note that renamed tests count towards both.
Chrome 125.0 ‑ Acceptance | course-page | view-course-stages-test: it should track when the monthly challenge banner is clicked
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > allowMultipleSelections: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > autocompletion: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > bracketMatching: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > closeBrackets: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > crosshairCursor: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > drawSelection: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > dropCursor: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > editable: it does something useful with the editor
Chrome 125.0 ‑ Integration | Component | code-mirror > Options > filename: it does something useful with the editor
…
Chrome 126.0 ‑ Acceptance | course-page | view-course-stages-test: it should track when the monthly challenge banner is clicked
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > allowMultipleSelections: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > autocompletion: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > bracketMatching: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > closeBrackets: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > crosshairCursor: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > drawSelection: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > dropCursor: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > editable: it does something useful with the editor
Chrome 126.0 ‑ Integration | Component | code-mirror > Options > filename: it does something useful with the editor
…

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Files Patch % Lines
app/models/user.ts 75.00% 1 Missing ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Outside diff range and nitpick comments (1)
app/models/user.ts (1)

213-213: Add a comprehensive description for the new syncGitHubUsername method.

It's recommended to add a brief comment describing what this method does, especially since it involves synchronization with an external system (GitHub), which could have implications on the user's data.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1168121 and b376304.

Files selected for processing (6)
  • app/components/settings/profile-page/username-section.hbs (1 hunks)
  • app/components/settings/profile-page/username-section.ts (2 hunks)
  • app/models/user.ts (2 hunks)
  • mirage/handlers/users.js (1 hunks)
  • tests/acceptance/settings-page/profile-test.js (2 hunks)
  • tests/pages/settings/profile-page.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • app/components/settings/profile-page/username-section.hbs
Additional context used
Biome
mirage/handlers/users.js

[error] 4-6: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 13-15: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 8-16: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 20-26: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 28-33: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

tests/acceptance/settings-page/profile-test.js

[error] 9-66: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/models/user.ts

[error] 104-106: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 156-158: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 207-207: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 225-227: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.


[error] 241-243: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.

Additional comments not posted (4)
tests/pages/settings/profile-page.ts (1)

16-18: The new button element for refreshing GitHub username is correctly implemented.

app/components/settings/profile-page/username-section.ts (2)

2-6: The necessary imports for AuthenticatorService, action, service, and tracked are correctly added.


17-17: The authenticator service is properly declared and the isSyncingGitHubUsername tracking variable is correctly implemented.

Also applies to: 19-19

app/models/user.ts (1)

247-254: Refactor to remove unnecessary else clause as per linting suggestions.

The else clause in the syncFeatureFlags method can be omitted for cleaner and more efficient code, as suggested by the static analysis tool.

  this.store.pushPayload(response);
- else {
-   return null;
- }

Likely invalid or redundant comment.

Comment on lines 256 to 263
UserModel.prototype.syncGitHubUsername = memberAction({
path: 'sync-github-username',
type: 'post',

after(response) {
this.store.pushPayload(response);
},
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure proper error handling in the syncGitHubUsername method.

The after hook in the syncGitHubUsername method pushes the payload to the store but does not handle potential errors that could arise from the API call. Consider adding error handling logic to manage such cases effectively.

+  try {
    this.store.pushPayload(response);
+  } catch (error) {
+    console.error('Failed to sync GitHub username:', error);
+  }
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
UserModel.prototype.syncGitHubUsername = memberAction({
path: 'sync-github-username',
type: 'post',
after(response) {
this.store.pushPayload(response);
},
});
UserModel.prototype.syncGitHubUsername = memberAction({
path: 'sync-github-username',
type: 'post',
after(response) {
try {
this.store.pushPayload(response);
} catch (error) {
console.error('Failed to sync GitHub username:', error);
}
},
});

Comment on lines 21 to 26
@action
async refreshFromGitHub() {
this.isSyncingGitHubUsername = true;
await this.authenticator.currentUser?.syncGitHubUsername(null);
this.isSyncingGitHubUsername = false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The refreshFromGitHub method in app/components/settings/profile-page/username-section.ts does not include any error handling mechanisms such as try-catch blocks. It is important to implement error handling to manage potential failures during the GitHub username synchronization process.

  • File: app/components/settings/profile-page/username-section.ts
  • Lines: 21-26
  • Method: refreshFromGitHub
Analysis chain

Ensure that error handling is implemented in the refreshFromGitHub action method to manage potential failures during the GitHub username synchronization process.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify error handling in the `refreshFromGitHub` method.
ast-grep --lang typescript --pattern $'class UsernameSectionComponent {
  $$$
  refreshFromGitHub($_, $_) {
    $$$
  }
  $$$
}'

Length of output: 129



Script:

#!/bin/bash
# Step 1: Search for the `UsernameSectionComponent` class definition in the codebase.
ast-grep --lang typescript --pattern 'class UsernameSectionComponent { $$$ }'

# Step 2: If the class is found, search for the `refreshFromGitHub` method within the located class.
ast-grep --lang typescript --pattern $'class UsernameSectionComponent {
  $$$
  async refreshFromGitHub() {
    $$$
  }
  $$$
}'

Length of output: 209



Script:

#!/bin/bash
# Step 1: Search for all class definitions in the codebase to identify the correct class.
ast-grep --lang typescript --pattern 'class $_ { $$$ }'

# Step 2: If the class is found, search for the `refreshFromGitHub` method within the located class.
ast-grep --lang typescript --pattern $'class $_ {
  $$$
  async refreshFromGitHub() {
    $$$
  }
  $$$
}'

Length of output: 37058



Script:

#!/bin/bash
# Step 1: Search for the `UsernameSectionComponent` class definition in the codebase.
rg 'class UsernameSectionComponent'

# Step 2: If the class is found, search for the `refreshFromGitHub` method within the located class.
rg 'async refreshFromGitHub'

Length of output: 289



Script:

#!/bin/bash
# Step 3: Check if error handling is implemented in the `refreshFromGitHub` method.
ast-grep --lang typescript --pattern $'class UsernameSectionComponent {
  $$$
  async refreshFromGitHub() {
    try {
      $$$
    } catch (error) {
      $$$
    }
  }
  $$$
}' app/components/settings/profile-page/username-section.ts

Length of output: 236



Script:

#!/bin/bash
# Display the implementation of the `refreshFromGitHub` method for manual inspection.
sed -n '/async refreshFromGitHub/,/}/p' app/components/settings/profile-page/username-section.ts

Length of output: 283

Comment on lines 28 to 33
server.post('/users/:id/sync-github-username', function (schema, request) {
let user = schema.users.find(request.params.id);
user.update({ username: 'updated-username' });

return user;
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation of the new POST endpoint for syncing the GitHub username is correct. However, consider using an arrow function for consistency with modern JavaScript practices.

- server.post('/users/:id/sync-github-username', function (schema, request) {
+ server.post('/users/:id/sync-github-username', (schema, request) => {
  let user = schema.users.find(request.params.id);
  user.update({ username: 'updated-username' });
  return user;
});
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
server.post('/users/:id/sync-github-username', function (schema, request) {
let user = schema.users.find(request.params.id);
user.update({ username: 'updated-username' });
return user;
});
server.post('/users/:id/sync-github-username', (schema, request) => {
let user = schema.users.find(request.params.id);
user.update({ username: 'updated-username' });
return user;
});
Tools
Biome

[error] 28-33: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

Comment on lines 52 to 65
test('can refresh github username', async function (assert) {
testScenario(this.server);
signInAsSubscriber(this.owner, this.server);

let currentUser = this.server.schema.users.first();

assert.strictEqual(currentUser.username, 'rohitpaulk');

await profilePage.visit();
await profilePage.refreshFromGitHubButton.click();
await settled();

assert.strictEqual(currentUser.reload().username, 'updated-username');
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new test for refreshing the GitHub username is correctly implemented. However, consider using an arrow function for the test definition to align with modern JavaScript best practices.

- test('can refresh github username', async function (assert) {
+ test('can refresh github username', async (assert) => {
  testScenario(this.server);
  signInAsSubscriber(this.owner, this.server);

  let currentUser = this.server.schema.users.first();

  assert.strictEqual(currentUser.username, 'rohitpaulk');

  await profilePage.visit();
  await profilePage.refreshFromGitHubButton.click();
  await settled();

  assert.strictEqual(currentUser.reload().username, 'updated-username');
});
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
test('can refresh github username', async function (assert) {
testScenario(this.server);
signInAsSubscriber(this.owner, this.server);
let currentUser = this.server.schema.users.first();
assert.strictEqual(currentUser.username, 'rohitpaulk');
await profilePage.visit();
await profilePage.refreshFromGitHubButton.click();
await settled();
assert.strictEqual(currentUser.reload().username, 'updated-username');
});
test('can refresh github username', async (assert) => {
testScenario(this.server);
signInAsSubscriber(this.owner, this.server);
let currentUser = this.server.schema.users.first();
assert.strictEqual(currentUser.username, 'rohitpaulk');
await profilePage.visit();
await profilePage.refreshFromGitHubButton.click();
await settled();
assert.strictEqual(currentUser.reload().username, 'updated-username');
});

@action
async refreshFromGitHub() {
this.isSyncingGitHubUsername = true;
await this.authenticator.currentUser?.syncGitHubUsername(null);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it's better to keep the 'refresh from github' name consistent everywhere

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sync is fine, we use it across many core actions so it's consistent with those. The actual text for the button might change over time (based on what makes most sense to a user), so not super important to keep that in sync with everything else.

Would recommend renaming to syncUsernameFromGitHub though, to avoid confusion around whether we're actually updating the username, or only user#githubUsername.

@libmartinito
Copy link
Contributor Author

i feel the spinner is already good way to communicate progress and completion. right now, we're not handling the happy path. do you think it's better to have an alert saying the user should contact us? also, for the happy path, do you think it's better to add an alert saying the change was successful?


await profilePage.visit();
await profilePage.refreshFromGitHubButton.click();
await settled();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be required, click() should already be calling await settled(). @libmartinito are you sure that this fails without a call to settled()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, works without the additional call to settled

{{/if}}
</div>

{{!-- TODO: Bring this back once implemented }}
{{!-- <TertiaryButtonWithSpinner @size="extra-small" class="mt-4" @shouldShowSpinner={{false}}>
<TertiaryButtonWithSpinner
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user has anonymous mode enabled, should we show this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user has anonymous mode enabled and clicked on this, what would happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense. user shouldn't be able to change github username if anonymous

Copy link
Member

@rohitpaulk rohitpaulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added q

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b376304 and 0dc7027.

Files selected for processing (5)
  • app/components/settings/profile-page/username-section.hbs (1 hunks)
  • app/components/settings/profile-page/username-section.ts (2 hunks)
  • app/models/user.ts (2 hunks)
  • mirage/handlers/users.js (1 hunks)
  • tests/acceptance/settings-page/profile-test.js (1 hunks)
Files skipped from review due to trivial changes (1)
  • app/components/settings/profile-page/username-section.ts
Files skipped from review as they are similar to previous changes (4)
  • app/components/settings/profile-page/username-section.hbs
  • app/models/user.ts
  • mirage/handlers/users.js
  • tests/acceptance/settings-page/profile-test.js

@libmartinito libmartinito dismissed rohitpaulk’s stale review June 19, 2024 11:40

applied review comments

@size="extra-small"
class="mt-4"
@shouldShowSpinner={{this.isSyncingUsernameFromGitHub}}
@isDisabled={{this.currentUser.hasAnonymousModeEnabled}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@libmartinito let's add a tooltip when this button is disabled:

Your profile has anonymous mode enabled. Your GitHub username is not visible to others.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0dc7027 and 9518266.

Files selected for processing (1)
  • app/components/settings/profile-page/username-section.hbs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/components/settings/profile-page/username-section.hbs

@libmartinito libmartinito merged commit 1eca00f into main Jun 21, 2024
7 checks passed
@libmartinito libmartinito deleted the add-refresh-from-github-button branch June 21, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants