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

IBX-2278: Added spinner to loading location meta data #320

Merged

Conversation

lucasOsti
Copy link
Contributor

@lucasOsti lucasOsti commented Feb 9, 2022

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-2278
Bug fix? no
New feature? no
BC breaks? no
Tests pass? no
Doc needed? no
License GPL-2.0

Screenshot 2022-02-09 at 13 37 27

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

const creationDateLabel = Translator.trans(/*@Desc("Created")*/ 'meta_preview.creation_date', {}, 'universal_discovery_widget');
const translationsLabel = Translator.trans(/*@Desc("Translations")*/ 'meta_preview.translations', {}, 'universal_discovery_widget');
const renderMetaPreviewLoadingSpinner = () => {
if (locationData && locationData.location && locationData.version) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this check is sufficient. If nothing is selected and there is no loading the spinner will be visible?

</>
);
};
const lastModifiedLabel = Translator.trans(/*@Desc("Last modified")*/ 'meta_preview.last_modified', {}, 'universal_discovery_widget');
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these translation moved below lines where they're used?

);
};
const renderMetaPreview = () => {
if (!locationData || !locationData.location || !locationData.version) {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe some additional func or move it above, as you used this kind of statement before (line 102)

const lastModifiedLabel = Translator.trans(/*@Desc("Last modified")*/ 'meta_preview.last_modified', {}, 'universal_discovery_widget');
const creationDateLabel = Translator.trans(/*@Desc("Created")*/ 'meta_preview.creation_date', {}, 'universal_discovery_widget');
const translationsLabel = Translator.trans(/*@Desc("Translations")*/ 'meta_preview.translations', {}, 'universal_discovery_widget');
const renderMetaPreviewLoadingSpinner = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Given this is inside ContentMetaPreview it can be shortened:

Suggested change
const renderMetaPreviewLoadingSpinner = () => {
const renderLoadingSpinner = () => {

@lucasOsti lucasOsti force-pushed the IBX-2278-Added-spinner-to-meta-preview-UDW branch from 12c38d1 to d09612b Compare February 23, 2022 09:20
@dew326 dew326 merged commit 5e43ed9 into ibexa:main Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants