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

Use alternative temporary ids for uniqueness in views #3248

Merged
merged 1 commit into from
Mar 24, 2020

Conversation

PVince81
Copy link
Contributor

Description

When using OCIS as backend, the ids of resources is a string instead of
integer. So we cannot embed those into DOM node ids and need to use
another alternative. This fix introduces a unique listId which is only
there to provide uniqueness across the current list and should not be
used for any data related operation.

This fixes the file actions menu when using OCIS as backend.

Related Issue

Fixes #3214
Fixes owncloud/ocis-phoenix#51

Motivation and Context

How Has This Been Tested?

Manual test with OCIS backend (see #3212 for setup)
Manual test with OC 10 backend just in case, also to test the "stime" sorting change which can currently only be tested with OC 10.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

I would be happier with another name for the attribute. Something that speaks for itself, that it's not an actual id but only for UI. Like viewId or uiKey or something similar... but apart from that this looks good 👍

@dpakach dpakach force-pushed the fix-ids-as-string branch from 5cf327b to 8419a07 Compare March 24, 2020 04:15
@dpakach
Copy link
Contributor

dpakach commented Mar 24, 2020

@PVince81 I just rebased this PR since the OCIS tests are failing and those have been skipped for now.

When using OCIS as backend, the ids of resources is a string instead of
integer. So we cannot embed those into DOM node ids and need to use
another alternative. This fix introduces a unique listId which is only
there to provide uniqueness across the current list and should not be
used for any data related operation.

This fixes the file actions menu when using OCIS as backend.
@PVince81 PVince81 force-pushed the fix-ids-as-string branch from 8419a07 to 9ac4081 Compare March 24, 2020 07:42
@PVince81
Copy link
Contributor Author

@kulmann you're right, I was also not comfortable with the name. I've renamed all listId to viewId now.

@PVince81 PVince81 merged commit 2b18928 into master Mar 24, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix-ids-as-string branch March 24, 2020 10:09
@LukasHirt LukasHirt mentioned this pull request Mar 25, 2020
16 tasks
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.

File ids and other ids as strings Files action menu not available
4 participants