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

Export comments #1461

Closed
rhymes opened this issue Jan 4, 2019 · 5 comments
Closed

Export comments #1461

rhymes opened this issue Jan 4, 2019 · 5 comments
Assignees
Labels
external contributors welcome contribution is welcome!

Comments

@rhymes
Copy link
Contributor

rhymes commented Jan 4, 2019

Is your feature request related to a problem? Please describe.

Now that dev.to has the option to export posts I think it's time to think about adding comments to the zip file.

I'm opening this issue to see if comments should be added and if so, how and with which attributes

Describe the solution you'd like

Comments have their own attributes but they're also part of a tree structure. Should the notion of the parent be part of the export? In which way?

It should also be decided which attributes are part of the exported JSON.

These are the attributes of the comment:

  create_table "comments", id: :serial, force: :cascade do |t|
    t.string "ancestry"
    t.text "body_html"
    t.text "body_markdown"
    t.integer "commentable_id"
    t.string "commentable_type"
    t.datetime "created_at", null: false
    t.boolean "deleted", default: false
    t.boolean "edited", default: false
    t.datetime "edited_at"
    t.string "id_code"
    t.integer "markdown_character_count"
    t.integer "positive_reactions_count", default: 0, null: false
    t.text "processed_html"
    t.integer "reactions_count", default: 0, null: false
    t.boolean "receive_notifications", default: true
    t.integer "score", default: 0
    t.integer "spaminess_rating", default: 0
    t.datetime "updated_at", null: false
    t.integer "user_id"
    t.index ["ancestry"], name: "index_comments_on_ancestry"
  end
@abraham
Copy link
Contributor

abraham commented Jan 4, 2019

What comments should be exported? Comments that the user had made? Comments on posts made by the user? If it's the later what are the expectations a user might have about their content being exported by somebody else. Are there UI affordances or documentation that needs to be updated to highlight this?

@rhymes
Copy link
Contributor Author

rhymes commented Jan 4, 2019

Hi @abraham, you only export your own content, so it would be the comments of the user requesting the export. Same as with the articles.

The UI definitely needs to be updated:

screenshot_2019-01-04 rhymes dev profile

@benhalpern benhalpern added the external contributors welcome contribution is welcome! label Jan 4, 2019
@triage-new-issues triage-new-issues bot removed the triage label Jan 4, 2019
@benhalpern
Copy link
Contributor

Most of the fields here are "for the user" and a couple are "for the platform"

    t.integer "reactions_count", default: 0, null: false
    t.integer "score", default: 0
    t.integer "spaminess_rating", default: 0
    t.datetime "updated_at", null: false

These stand out as "for the platform" fields that should not be included.

@rhymes
Copy link
Contributor Author

rhymes commented Jan 4, 2019

@benhalpern agreed, only one detail, the export for posts contains the reactions counts:

https://github.com/thepracticaldev/dev.to/blob/master/app/services/exporter/articles.rb#L39 (and line 44)

@maestromac
Copy link
Member

Resolved with #1471

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external contributors welcome contribution is welcome!
Projects
None yet
Development

No branches or pull requests

5 participants