-
Notifications
You must be signed in to change notification settings - Fork 0
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
F t31116 demosplan UI no longer use routing #91
Changes from 52 commits
ff4de38
d7329b8
bb3ff53
a6b53e3
395a417
25f8d2a
cab5e33
1095c03
f3a4e1a
c855277
104e2b5
6f5b8b1
ad1afe6
b6404ac
0b6cba1
98fdabd
ca229db
1c4e829
d7d1be9
54d9444
3784acc
4c17057
2783e7d
5855c9d
f998847
551eeab
3a51670
462e0e5
1bb59b6
7fb3fad
82e69ec
ed7308b
d20932a
9fcdfbc
cd139e8
ecb50ce
9c74850
8f7bf80
031f9e6
39b6d09
db654ec
391f33b
57ffba6
e96471b
61dec86
5873380
3f86088
8c7cfab
829f74b
a4221b3
31890c2
b0db63b
2b50a4c
fc401f5
8d194ed
4e4acde
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
</span> | ||
<span v-if="isImage"> | ||
<img | ||
:src="Routing.generate('core_file', { hash: file.hash })" | ||
:src="getFileByHash(file.hash)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should try to avoid using any type of generate route within demosplan-ui. We better should pass the generated src. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here no more using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry. I wrote it wrong. What I ment was "making api-requests" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but we can leave it like it is by now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @salisdemos this request is needed to show image thumbs of images that are already uploaded. how would you solve this without api requests? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As I said. I am fine with leaving like it iss - by now. |
||
:aria-label="Translator.trans('image.preview')" | ||
width="50px"> | ||
</span> | ||
|
@@ -37,6 +37,8 @@ import { prefixClassMixin } from '../../../mixins' | |
export default { | ||
name: 'DpUploadedFile', | ||
|
||
inject: ['getFileByHash'], | ||
|
||
mixins: [prefixClassMixin], | ||
|
||
props: { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ import { dpApi } from '../../../../lib' | |
* | ||
* @returns {Array<Ids>} | ||
*/ | ||
function getFileIdsByHash (hashes) { | ||
function getFileIdsByHash (hashes, route) { | ||
return dpApi.get( | ||
Routing.generate('api_resource_list', { resourceType: 'File' }), | ||
route, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should rework this one separately. This logic isn't generic enough. Maybe this even doesn't belong here bot in the core |
||
{ | ||
filter: { | ||
hasHash: { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is BREAKING.
And we should mention That
Routing.generate
is not used internally anymore. (in most the places)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood correctly, breaking changes are not mentioned as such until version 1?
Also, I'm not sure we need to mention internal changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I thought we should mention this, because its not internal since You have to pass (other) props/values in the components.
Its just possible to make braeaking changes without bumping a major version (but with telling in the chagnelog). That was, what was I thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I am not sure at all