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

search, my dashboard: highlight verified community #2587

Merged

Conversation

anikachurilova
Copy link
Contributor

@anikachurilova anikachurilova commented Feb 19, 2024

@anikachurilova anikachurilova force-pushed the highlight-verified-community branch 2 times, most recently from 3f977b3 to 6863899 Compare February 19, 2024 10:50
Copy link
Member

@alejandromumo alejandromumo left a comment

Choose a reason for hiding this comment

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

LGTM, we (@yashlamba) just have one question about the definition of a branded community. It was asked in another PR

Copy link
Member

@0einstein0 0einstein0 left a comment

Choose a reason for hiding this comment

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

Reviewed with @jrcastro2. Left a minor comment

@anikachurilova anikachurilova force-pushed the highlight-verified-community branch 3 times, most recently from c034f4c to 61f1f2b Compare February 23, 2024 09:22
@lnielsen
Copy link
Member

The "part of" should not show the "Fancy community".

@anikachurilova anikachurilova force-pushed the highlight-verified-community branch 4 times, most recently from 3cede6f to 45bdade Compare February 27, 2024 10:22
@@ -117,6 +146,9 @@ class RecordsResultsListItem extends Component {

<div className="flex justify-space-between align-items-end">
<small>
<p>
<b>{printPartOf()}</b>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<b>{printPartOf()}</b>
<b>{<PartOfCommunities />}</b>

@@ -58,6 +59,34 @@ class RecordsResultsListItem extends Component {
const filters = currentQueryState && Object.fromEntries(currentQueryState.filters);
const allVersionsVisible = filters?.allversions;
const numOtherVersions = versions.index - 1;
const communitiesEntries = result.parent?.communities?.entries;

const printPartOf = () => {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const printPartOf = () => {
const PartOfCommunities = () => {

<Label
as="a"
href={`/communities/${verifiedCommunity.id}`}
style={{ backgroundColor: verifiedCommunity?.theme?.style?.primaryColor }}
Copy link
Member

Choose a reason for hiding this comment

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

I think that should translate to a className rather that inline style if the community is verified

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to discuss. Created an issue for this #2596

return displayCommunity;
};

const verifiedCommunity = displayCommunity(communities);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const verifiedCommunity = displayCommunity(communities);
const verifiedCommunity = filterBrandedCommunity(communities);

assuming from the code branded == verified at the moment.

@@ -42,6 +43,32 @@ export const ComputerTabletUploadsItem = ({
);
const uniqueViews = _get(result, "stats.all_versions.unique_views", 0);
const uniqueDownloads = _get(result, "stats.all_versions.unique_downloads", 0);
const communitiesEntries = result.parent?.communities?.entries;
const printPartOf = () => {
Copy link
Member

Choose a reason for hiding this comment

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

duplicate of the above?

@@ -42,6 +43,33 @@ export const MobileUploadsItem = ({
);
const uniqueViews = _get(result, "stats.all_versions.unique_views", 0);
const uniqueDownloads = _get(result, "stats.all_versions.unique_downloads", 0);
const communitiesEntries = result.parent?.communities?.entries;
const printPartOf = () => {
Copy link
Member

Choose a reason for hiding this comment

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

same

* Add "Part of" to the global search and user dashboard
* closes zenodo/zenodo-rdm#716
@slint slint merged commit 426e2d2 into inveniosoftware:master Feb 28, 2024
2 checks passed
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.

my dashboard, generic search: Uploads to verified community to be highlighted in search -> try some mockups
6 participants