MinaFoundation / gptSurveySummarizer

Discord bot to gather your thoughts
2 stars 2 forks source link

feature command edit/update surveys and their components #53

Closed berkingurcan closed 2 weeks ago

berkingurcan commented 3 weeks ago

Is there a difference between editing and updating? @es92 @CristinaEche If there is, can you give an example?

CristinaEche commented 3 weeks ago

Hello @berkingurcan, it is the same, the idea is to be able to retrieve the modal of a published survey and edit or update any information previously created.

CC: @es92

berkingurcan commented 3 weeks ago

Okay!

CristinaEche commented 3 weeks ago

We are testing 5 scenarios:

1- editing questions and descriptions without responses - single and multi response testing- OK 2- editing questions and descriptions with responses single and multi - with responses- OK 3- Multiresponse: delete questions - if only one questions it turns into single question modal- OK 4- Multiresponse : add questions - not able to do it so far- TBC

CC: @es92

CristinaEche commented 3 weeks ago

Evidence:

Multiresponse: delete questions - if only one questions it turns into single question modal

Screenshot 2024-06-04 at 14 26 22

Multiresponse changing description from 123 to 456

Screenshot 2024-06-04 at 14 19 06 Screenshot 2024-06-04 at 14 18 29 Screenshot 2024-06-04 at 14 17 15

Videos of single response testing

https://github.com/MinaFoundation/gptSurveySummarizer/assets/166489186/9b6b8f55-dcf7-40e9-84ca-126e4efa744f

https://github.com/MinaFoundation/gptSurveySummarizer/assets/166489186/6a89d783-e179-4aa9-906e-fff1a9be3dbc

berkingurcan commented 3 weeks ago

TODO!: I have an error while adding more questions to initial question number while editing:

Unhandled exception: ValidationError > s.string
  Expected a string primitive

  Received:
  | undefined

    at _StringValidator.handle (/Users/berkingurcan/Documents/gptSurveySummarizer/node_modules/@sapphire/shapeshift/src/validators/StringValidator.ts:23:73)
    at _StringValidator.parse (/Users/berkingurcan/Documents/gptSurveySummarizer/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:103:2)
    at TextInputBuilder.setValue (/Users/berkingurcan/Documents/gptSurveySummarizer/node_modules/@discordjs/builders/src/components/textInput/TextInput.ts:117:36)
    at <anonymous> (/Users/berkingurcan/Documents/gptSurveySummarizer/src/commands/handleRespondButton.ts:68:12)
    at Array.map (<anonymous>)
    at handleRespondButton (/Users/berkingurcan/Documents/gptSurveySummarizer/src/commands/handleRespondButton.ts:62:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Client.<anonymous> (/Users/berkingurcan/Documents/gptSurveySummarizer/src/bot.ts:110:9)
CristinaEche commented 3 weeks ago

Multiresponse editing and question deletion tested one more time, here the evidences:

Screenshot 2024-06-05 at 14 36 03

https://github.com/MinaFoundation/gptSurveySummarizer/assets/166489186/c8f85c87-e731-49c7-842f-2a0cfb2ff8a3

https://github.com/MinaFoundation/gptSurveySummarizer/assets/166489186/4d869fae-eb5d-4efa-b188-1c0100a233cc

berkingurcan commented 3 weeks ago

TODO!: I have an error while adding more questions to initial question number while editing:

Unhandled exception: ValidationError > s.string
  Expected a string primitive

  Received:
  | undefined

    at _StringValidator.handle (/Users/berkingurcan/Documents/gptSurveySummarizer/node_modules/@sapphire/shapeshift/src/validators/StringValidator.ts:23:73)
    at _StringValidator.parse (/Users/berkingurcan/Documents/gptSurveySummarizer/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:103:2)
    at TextInputBuilder.setValue (/Users/berkingurcan/Documents/gptSurveySummarizer/node_modules/@discordjs/builders/src/components/textInput/TextInput.ts:117:36)
    at <anonymous> (/Users/berkingurcan/Documents/gptSurveySummarizer/src/commands/handleRespondButton.ts:68:12)
    at Array.map (<anonymous>)
    at handleRespondButton (/Users/berkingurcan/Documents/gptSurveySummarizer/src/commands/handleRespondButton.ts:62:8)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Client.<anonymous> (/Users/berkingurcan/Documents/gptSurveySummarizer/src/bot.ts:110:9)

Solved.

CristinaEche commented 2 weeks ago

FYI: detected that we cannot use "-" in a survey title. It let's us create the survey but if we want to edit the survey it show an error. usage of "-" will be restricted.