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

Allow link retrieval by the leader, remove v1 flow #580

Merged
merged 69 commits into from
Apr 10, 2024
Merged

Conversation

douglasnaphas
Copy link
Owner

With link retrieval added, I officially much prefer people to use the v2 links-oriented flow.

gh-572

The v1 flow is too brittle. It will be confusing having login be
meaningful for v1 and v2 simultaneously.

Any shortcomings of v2 do not outweigh the risk that v1 carries of
lockout.
We use OIDC and SSO login now.
I think I depend on having these available. They're just going to have
to be in the GitHub Actions output.
gh-568

Because my Plan a Seder button renders as an <a> element, I don't have
access to the "disabled" form control attribute.

I want to see what the HTML looks like when the button is disabled.

This says there's not a portable way to check for a disabled link:

https://stackoverflow.com/questions/10276133/how-to-disable-html-links

ChatGPT says to use:

```
link.getAttribute('aria-disabled') === 'true' ||
link.hasAttribute('disabled')
```
I like how the v2 Papers look. They use a medium container.
gh-568

You can't see a disabled Plan a Seder button against the Red Sea
background. The About link has always been hard to see against the Red
Sea background as well.
I want to show more of the Red Sea background. The buttons are small anyway.
gh-568

Even sm was too wide. On mobile xs is, too, but at least it's a bit
narrower on desktop.
gh-568

When picking the script.

We'll use this instead of prompting them for their name.
So I can use it to create users.
I don't come up in search results for "mad lib haggadah."
gh-567

I haven't used them for a while now. I use the opaque cookie that my app
sets.
We use the opaque cookie only.
gh-572

I'd like to remove backend v1 entirely.
I got the error:

SyntaxError: Cannot use import statement outside a module
It seems to be refetching and thus re-rendering constantly.
My create-haggadah/index page is refetching and re-rendering like crazy.
Trying to only get it to fetch when it first loads.

https://tanstack.com/query/v4/docs/framework/react/guides/important-defaults
That was in there by mistake. I'm wondering if that was the cause for
the strange behaviors I was seeing: the page re-rendering constantly,
to the point where I couldn't even type more than one character in the
the boxes without it getting blanked out; the fetches firing and
re-firing constantly; and the XPath for 'text contains <nickname>' never
being found, despite being plainly visible on the page.
I'm still trying to prevent the call to /scripts from refiring every
time I type a character. I'm hypothesizing that this is because I'm
wrapping the whole app in the QueryClientProvider.
No matter what I do with react-query, my seemingly unrelated useEffect
hook that fetches the scripts re-runs every time the seemingly unrelated
text boxes get more than one character typed in them. This is despite
the fact that I am passing [] as the second arg to useEffect.
According to ChatGPT:

> The . in the contains() function refers to the string value of the
> current node, including all descendant text nodes.
I'm hypothesizing that the change in order from an earlier commit on the
v2-login branch was the cause for the re-renders to happen on every
state change.
I'm getting strange behavior where the leader's join-seder request seems
to have the right params, but fails, and the Seder proceeds, without the
leader able to participate.
I think this is the reason that joining a seder with a leader name like
my-email@email.com was failing. Certain characters were not allowed. I
think DynamoDB and React handle the types of injection that I was trying
to avoid with the character blacklist.
I probably shouldn't even be using breaks at all as I am.
The "links link" is the permalink to the leader's page that gives all
the participant permalinks.
Because I'm not including the pw in the thing I'm looking for, since it
might get logged if not found.
Though for some reason in the console the login cookie was sent without
{credentials: "include"}.
The /seders page is refreshing periodically. I'd rather have it stay
displayed once it's displayed the first time, even if a subsequent
refresh request fails.
But maybe don't print it.

I am not prioritizing testing the links link without revealing it at
this time.
@douglasnaphas douglasnaphas merged commit 6068e95 into master Apr 10, 2024
7 checks passed
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.

1 participant