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

OrgUsers: Refactor change LastSeenAtAge from '10 years' to 'Never' #84247

Merged
merged 2 commits into from Mar 12, 2024

Conversation

eleijonmarck
Copy link
Contributor

@eleijonmarck eleijonmarck commented Mar 12, 2024

What is this feature?
All users table shows Never when a user has never logged in. In the user organization tab we show 10 years from previous implementation. This changes to Never in the org tab.

image

Why do we need this feature?
Aligning the all users table to the org users table.

@eleijonmarck eleijonmarck added type/bug no-changelog Skip including change in changelog/release notes backport v10.4.x labels Mar 12, 2024
@eleijonmarck eleijonmarck added this to the 11.0.x milestone Mar 12, 2024
@eleijonmarck eleijonmarck self-assigned this Mar 12, 2024
@eleijonmarck eleijonmarck requested a review from a team as a code owner March 12, 2024 09:56
@eleijonmarck eleijonmarck changed the title OrgUsers: Refactor change LastSeenAtAge to Never OrgUsers: Refactor change LastSeenAtAge from '10 years' to 'Never' Mar 12, 2024
Copy link
Contributor

This PR must be merged before a backport PR will be created.

@@ -107,7 +108,9 @@ export const OrgUsersTable = ({
{
id: 'lastSeenAtAge',
header: 'Last active',
cell: ({ cell: { value } }: Cell<'lastSeenAtAge'>) => value,
cell: ({ cell: { value } }: Cell<'lastSeenAtAge'>) => {
return <>{value && <>{value === '10 years' ? <Text color={'disabled'}>Never</Text> : value}</>}</>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return <>{value && <>{value === '10 years' ? <Text color={'disabled'}>Never</Text> : value}</>}</>;
return <>{value && value === '10 years' ? <Text color={'disabled'}>Never</Text> : value}</>;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed in the OrgUsersTable.tsx and the UsersTable.tsx

Copy link
Contributor

Choose a reason for hiding this comment

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

@eleijonmarck Let me correct myself, the change that I recommended changes the result if value === undefined (however I don't think the value could be undefined), so your first solution was right, could you please revert this change and the other one? Sorry 😇

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mgyongyosi i tested out the changes locally 🤔 i think. let me first try locally again

@eleijonmarck eleijonmarck merged commit fbfaf8e into main Mar 12, 2024
14 checks passed
@eleijonmarck eleijonmarck deleted the eleijonmarck/orgusertable/lastseen-never branch March 12, 2024 11:18
grafana-delivery-bot bot pushed a commit that referenced this pull request Mar 12, 2024
…84247)

* refactor: change lastseenatage to Never

* removed unncessecary fragments

(cherry picked from commit fbfaf8e)
eleijonmarck added a commit that referenced this pull request Mar 12, 2024
…o 'Never' (#84260)

OrgUsers: Refactor change `LastSeenAtAge` from '10 years' to 'Never' (#84247)

* refactor: change lastseenatage to Never

* removed unncessecary fragments

(cherry picked from commit fbfaf8e)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend backport v10.4.x no-changelog Skip including change in changelog/release notes type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants