-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
6.0 html and json #400
6.0 html and json #400
Conversation
From how i understand deployments (i have no experience at all), the best way would be one 'official' deployment. |
That would be super interesting... and a much easier way to use the web UI.
I'll try to research that and see what the "hosting" would like like. The
embedded version in Apps Script seemed pretty janky.
KW
…On Fri, Dec 22, 2023, 12:54 jonas0b1011001 ***@***.***> wrote:
since each user would have their own deployment anyway.
From how i understand deployments (i have no experience at all), the best
way would be one 'official' deployment.
If i'm not mistaken you can select to run the deployed code 'as the user'
which would allow to save and load all settings from the user properties
service. I don't know how/if triggers will work with this.
So in theory the user will only need the html ui and never ever see the
code or the code editor.
—
Reply to this email directly, view it on GitHub
<#400 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM7OH5JEAEFAVMIG3A3UCQ3YKXJNFAVCNFSM6AAAAABBADYSEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRXHE4TAMBYGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@jonas0b1011001 , try this URL as a "real" web app deployment and see if it works the way you described. I used the settings of "Execute As: User accessing the web app." and "Who has access: Anyone with Google account." https://script.google.com/macros/s/AKfycbw1P6zULjJVgElH6MGF7CPs8_m2nZRxjNC851gM1O32mAO4_-VCZ8CCJK98LDJBV_MHUw/exec Not to say I should host this if it does go live, but thought we could at least give this a try in testing. |
Fixing failed check on // comment in styles.html
I can create/edit/delete calendar entries, but i'm missing a way to actually start/schedule a sync. |
I left the "Install" in Code.gs. In hindsight, it would make sense to put
that in the web app somewhere... I was just focused on the calendar
management piece. I left howFrequent as well as the email summary pieces
in Code.gs.
KW
…On Sat, Dec 23, 2023 at 9:24 AM jonas0b1011001 ***@***.***> wrote:
I can create/edit/delete calendar entries, but i'm missing a way to
actually start/schedule a sync.
—
Reply to this email directly, view it on GitHub
<#400 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM7OH5L3XNEG6UXZBLZ3DTTYK3ZR5AVCNFSM6AAAAABBADYSEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGMYTIOJYGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hey, but at least the calendar piece is working for someone other than me!
I'll take that as a win ;-)
…On Sat, Dec 23, 2023 at 9:52 AM Kyle Whitmire ***@***.***> wrote:
I left the "Install" in Code.gs. In hindsight, it would make sense to put
that in the web app somewhere... I was just focused on the calendar
management piece. I left howFrequent as well as the email summary pieces
in Code.gs.
KW
On Sat, Dec 23, 2023 at 9:24 AM jonas0b1011001 ***@***.***>
wrote:
> I can create/edit/delete calendar entries, but i'm missing a way to
> actually start/schedule a sync.
>
> —
> Reply to this email directly, view it on GitHub
> <#400 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AM7OH5L3XNEG6UXZBLZ3DTTYK3ZR5AVCNFSM6AAAAABBADYSEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGMYTIOJYGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Updated for Install/Uninstall in index.html and App Settings in appSettings.json
Added install/uninstall and App Settings section. Fixed bug with "info" icon affecting checkbox nearby.
updated buttons
Updated buttons.
@jonas0b1011001 I updated the html to include Install/Uninstall as well as the rest of the App Settings (separate json file called appSettings.json) so now there are zero settings or actions someone would have to take outside of the html. I updated the same public deployment so you should see the new UI if you use the URL from above. Not entirely true... I left out startSync. Should that be included? |
Do you think that's strictly a function of the web app being deployed by me instead of on your own profile? In other words, if you deploy straight from the code, do the triggers work for you? |
All seems to work normal if i deploy for myself (not matter the 'execute as' settings), can you confirm that the link above does creates working triggers for you? |
I just confirmed that link does work for me to create a trigger. So it seems like the single-hosting method might not work... which is unfortunate because it sounded like the preferred method. I also noticed that when I pushed the last commit, my add/edit calendar functionality is now broken. I'll troubleshoot and fix now that I'm back from vacation. |
moved webpage functions to Helpers.gs, fixed instructions, cleaned up some logging that was leftover from dev
Moved all website function from code to helpers. Cleaned up google.script.run functions with error logging. Fixed other bugs from last commit where screen would go blank after hitting certain buttons.
Cleaned up client-side google.script.run functions. Fixed buttons that weren't responding correctly. Added user confirmation dialogs for all actions. Other debugging. Also made sourceCalendarName the json key instead of sourceURL. This gives the ability to have "variants" of each calendar (same ics, different parameters) that can co-exist.
minor updates to support newest index.html
Fixing minor CodeFactor failure.
Fixing minor CodeFactor error.
While this did work "locally", the centrally-hosted html page wouldn't work. Likely direction is to use config.gs (or similar). |
I'm sure you will find ways to run this code more cleanly and likely some things to debug. Nonetheless, I was able to create the html front-end and json storage in this version. Each calendar gets run through the startSync individually so that all of the parameters are calendar-specific. The only variables left in code.gs are the main timer (howFrequnt) and the email variables... I gave up on trying to keep the existing array of arrays so this will have to be a clean break from the old version. One other thing of note is that this is somewhat based on my syncDelay version so all of the fromGAS entries are different than before so each calendar here can write to the same Target Calendar without conflict. I'm thinking it would be a good add to look for the old fromGAS=true and just delete all of those entries. If we don't, there will be duplicates the first time someone runs this code. Lastly, I updated the Installation Instructions for this version, but I'm not entirely sure Test Deployments is the "right" way to launch the index.html page, but it works so I just went with it. It seemed cleaner than messing with Deployments... since each user would have their own deployment anyway. This version also already includes #372 (it was a building block for this code), #392, and #217 so we can close all of those if this gets merged.