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

Add integration for editing dns records #369

Merged
merged 11 commits into from
Mar 19, 2023
Merged

Conversation

Myrfion
Copy link
Contributor

@Myrfion Myrfion commented Mar 17, 2023

What it changes

  • creates a new page by editing the DNS record (I changed the file name to match the new naming)
  • updates the form component for DNS records so it supports editing
  • makes server-side integration with DNS records workflow and its API

closes #331

@Myrfion Myrfion added this to the Milestone 0.6 milestone Mar 17, 2023
@Myrfion Myrfion requested review from humphd and Eakam1007 March 17, 2023 15:54
@Myrfion Myrfion self-assigned this Mar 17, 2023
@humphd humphd requested a review from Genne23v March 17, 2023 16:30
@Eakam1007
Copy link
Contributor

Seems like tests are failing due to the same error as the Type-Check error

@humphd
Copy link
Contributor

humphd commented Mar 17, 2023

Can you rebase and update your code to use the new naming/layout that we landed in #349?

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this locally, and had to make the following changes:

diff --git a/app/routes/__index/domains/$dnsRecordId.tsx b/app/routes/__index/domains/$dnsRecordId.tsx
index bbf83d9..b6398cf 100644
--- a/app/routes/__index/domains/$dnsRecordId.tsx
+++ b/app/routes/__index/domains/$dnsRecordId.tsx
@@ -5,7 +5,7 @@ import { z } from 'zod';
 import { parseFormSafe } from 'zodix';
 import type { ActionArgs, LoaderArgs } from '@remix-run/node';
 import DnsRecordForm from '~/components/dns-record/form';
-import { updateDnsRequest } from '~/queues/dns/dns-flow.server';
+import { updateDnsRequest } from '~/queues/dns/update-record-flow.server';
 import { requireUser } from '~/session.server';
 import { getRecordById } from '~/models/record.server';

@@ -55,7 +55,7 @@ export const action = async ({ request }: ActionArgs) => {
     id: Number(data.id),
     username: user.username,
     type: data.type,
-    name: data.name,
+    subdomain: data.name,
     value: data.value,
   });

You should also rebase, since a lot has changed since you wrote this code.

@Myrfion
Copy link
Contributor Author

Myrfion commented Mar 18, 2023

@humphd updated to new terminology and updated terminology inside of the table component itself, except the filename, because I am not sure if it is a good idea to do it in this PR (it would be a lot of changes)

Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good. A few things

app/components/dns-record/form.tsx Outdated Show resolved Hide resolved
app/components/domains-table.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@humphd humphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also change the table heading Name to Subdomain as well on line 123 of app/components/domains-table.tsx

@Myrfion Myrfion requested review from humphd and SerpentBytes March 19, 2023 00:25
humphd
humphd previously approved these changes Mar 19, 2023
@Myrfion Myrfion merged commit 7dc6d7d into main Mar 19, 2023
@Myrfion Myrfion deleted the feature/331/dns-record-editing branch March 19, 2023 00:39
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.

Add record editing UI + integration
4 participants