-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add location for storing citation styles #257
Comments
I like this. Why do you think its probably not a good idea? One could treat these files simply as static assets (i.e. similar to small images) and simply copy them during build.
That's an option too, probably using Azure storage. But the Azure static website we are currently using is essentially also an Azure storage instance with bells and whistles so there is not much advantage of using it. I guess the main advantage would be that the styles can be updated independently of a build and that the build times are minimally lower. |
I guess my first concern would be the size of the plugin. But perhaps an extra 36 MB isn't too bad, or 11 MB if we keep them zipped. Secondly, we'd need to build some sort of index during the build step but perhaps a sorted list and binary search would be enough and not too expensive. I don't know a whole lot about the styles files but the title and title-short,
seems sufficient to search on.
Something that allows us to search for files rather than just file names would be the most important part. We were discussing some server that could be queried but perhaps it is overkill.
Yup, and add-in size. |
What do you think about the following:
In this way, the user only downloads the styles that he really needs. There is of course room for optimization. For example, one probably doesn't need the whole index file but only parts of it. This then indeed would require a proper server + endpoint; but I would say let's worry about this later. I agree, if one doesn't want to build the index beforehand, then a server implementation (or file storage + search) is necessary. But as the index is essentially static and only need to be rebuilt when the styles are updated, I don't think this is a huge overhead. |
I think we are mostly on the same page 😛 I.e., there is a lowest hanging fruit that is,
But except for that, I think I need to do a bit more Googling X)
Agreed. Not sure how to deal with submodules -> me googling.
I've assumed files in
Perhaps that does end up being the easiest way, even if some caching solution has to be used. Why would you need a cache instead of viewing it as lazy loading a resource and therefore automatically storing all the accessed styles for the session? |
The add-in is essentially only a website that we have to host ourselves and which is essentially side-loaded in a new frame. This means that there is not such a thing as "offline access".
Good question. Maybe it's already sufficient to let the browser handle the caching. What I wanted to prevent is that every call to the csl library triggers a re-download of the style file. |
We could use local storage https://docs.microsoft.com/en-us/office/dev/add-ins/develop/persisting-add-in-state-and-settings |
We need to store the citation styles somewhere, the main options are
4. can we do this with our current Azure setup?
We need to store both the citation styles themselves (https://github.com/citation-style-language/styles) and locales (https://github.com/citation-style-language/locales)
The text was updated successfully, but these errors were encountered: