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

Change edit link text for commons category #18

Merged
merged 1 commit into from Aug 10, 2017

Conversation

Projects
None yet
3 participants
@simon04
Contributor

simon04 commented Aug 9, 2017

@reiterbene, @pixelhaufen: How does definitions.json relate to https://wikidaheim.at/api/api.php?format=json&action=query&type=structure? Since I cannot adapt the latter, this modification is not fully tested.

@reiterbene

This comment has been minimized.

Member

reiterbene commented Aug 10, 2017

this file was only created to transmit the icon and marker base64/svg to @pixelhaufen - so the editLinkText has to be implemented by him on the server side.

@@ -144,7 +143,8 @@ class ResultList extends Component {
{ sortedItems.map((item) => (
<ResultListItem
item={ item }
categoryColor={ getCategoryColor(item) }
categoryColor={ getCategory(item).get('color') }
editLinkText={ getCategory(item).get('editLinkText') }

This comment has been minimized.

@reiterbene

reiterbene Aug 10, 2017

Member

we should not call getCategory twice, as we will trigger the find-action again. We should cache the property inside sortedItems.map.

This comment has been minimized.

@simon04

simon04 Aug 10, 2017

Contributor

Since the number of categories low, the performance penalty shouldn't be very high. Nevertheless, I adapted the code and rebased the commit.

@pixelhaufen

This comment has been minimized.

pixelhaufen commented Aug 10, 2017

added editLinkText to api - hope that is what you wanted?

@simon04

This comment has been minimized.

Contributor

simon04 commented Aug 10, 2017

@pixelhaufen: Thanks for adding the editLinkText to the API. 😄

@reiterbene reiterbene merged commit 4cdbe58 into Wikimedia-Austria:master Aug 10, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment