Replies: 5 comments
-
Hey Pierrick, let’s discuss about that, I have access. |
Beta Was this translation helpful? Give feedback.
-
Ok I finally managed to get some time to answer, I dig into the vuetify templates and they are amazing. Tha ability to intrduce js directly into the template make it super easy to use directly templates from the vuetify website. So I would say that for specific usages as a last resort solution it's awesome class MyCopyPaste(vy.VuetifyTemplate):
template = traitlets.Unicode('''
<template>
<v-col>
<v-btn icon @click="copyToClipboard()">
<v-icon>mdi-content-copy</v-icon>
</v-btn>
<textarea v-model="my_text" ref="text" style="display: none" />
</v-col>
</template>
<script>
modules.export = {
methods: {
copyToClipboard() {
const txt = this.$refs.text
txt.style.display = 'block';
txt.select();
document.execCommand('copy');
txt.style.display = 'none';
}
}
}
</script>
''').tag(sync=True)
my_text = traitlets.Unicode('').tag(sync=True)
mcp = MyCopyPaste()
mcp.my_text = 'Hello\nWorld'
mcp BUT as you see in this very small example it's a complete freezed element that cannot be changed in any ways and I don't think it's a good idea to introduced freezed things in the lib. I was thinking that the element that we provide in the lib are starting points that can still be customized by the end developer. I already have 2 examples in mind : In the import aoi module I change the title of the aoi_tile because it was adapted to the module aoi_tile= aoi.TileAoi(aoi_io, methods = ['Draw a shape', 'Upload file', 'Use points file'])
aoi_tile.set_title('Convert to Google Earth Engine asset') or in the pysmm module my last PR is to remove the shade from the same tile to better integrate in the menu you created : aoi_tile = tiles.aoi_tile(aoi_io, remove_method=['Country boundaries', 'Draw a shape', 'Upload file'])
aoi_tile.children[0].elevation = 0 it would be impossible with a vuetifytemplate. In short I need to be convinced 😄 |
Beta Was this translation helpful? Give feedback.
-
Yes, I agree with you in terms of the less widget personalization, I'm not intended to replace or remove our existing widgets but just create new ones where there are some limitations in the functionalities, my example is the current According with this, I'm not sure what do you refer when you said this sentence:
Actually, the templates can be customized in all the sense, but of course, it will require more work, but as I said, we could include in the library this option for specific places. |
Beta Was this translation helpful? Give feedback.
-
Ok I'll better explain this very point. The lib provide flexible objects that still embed If we go for templating, the end developer, so not us that have access to the second loss, as an end user you also loose the ability to see the used options using It looks like a pandora box to me. We will start doing our custom templating and in the end I will only use mine and you will only use yours because we will customize them to our needs. Nevertheless I strongly agree that some bugs exists in the
It could easily be applied to the DatePicker widget and its |
Beta Was this translation helpful? Give feedback.
-
I totally agree with you. I know the limitations of templates, and my aim is not to replace the current ones that are working well, just to have some alternative and specific widgets-templates to fix the ipyvuetify bugs (at this moment I'm only thinking on DatePicker). |
Beta Was this translation helpful? Give feedback.
-
@ingdanielguerrero I just want to verify that you have access to that. And then start a converstation about ipyvuetify template and there usage in the lib
I'll wait for your green light
Beta Was this translation helpful? Give feedback.
All reactions