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

refactor: split CSS class tasks-modal-section #2804

Conversation

ilandikov
Copy link
Collaborator

Description

  • Split tasks-modal-section class into classes depending on their content (date, recurrence, description, etc)
  • Remove some unused properties
  • Use <section> elements to make the HTML code more explicit semantically
  • Remove a nesting level (<div> at the top level of the modal)
  • Remove redundant comments
  • Slight change in the look of the modal

Motivation and Context

Make possible extraction of components from EditTask.scss and EditTask.svelte. Now CSS class tasks-modal-section contains properties related to all the sections (dependencies, dates, description, etc) that makes that impossible.

How has this been tested?

Some changes were covered by unit tests, but most of them verified by manual test in demo vault.

Screenshots

Before After
Снимок экрана 2024-05-06 в 00 50 09 Снимок экрана 2024-05-06 в 00 50 37

Types of changes

Internal changes:

  • Refactor (prefix: refactor - non-breaking change which only improves the design or structure of existing code, and making no changes to its external behaviour)

Checklist

  • My code follows the code style of this project and passes yarn run lint.
  • My change has adequate Unit Test coverage.
    • No test coverage on the CSS code

Terms

There is only one checkbox anyways
…es to tasks-modal-dependencies-section and do not use the former
…ained that class

There is no point in having a <div> that just contains the <form>. Better merge those and remove a level of nesting
This is now insured by the order of elements
@ilandikov
Copy link
Collaborator Author

@claremacrae the diff of the .svelte file is not rendered well on GitHub due to one nesting level on very top being gone now (a <div> removed), I suggest taking a look at it in WebStorm the changes are seen in a clearer way.

@claremacrae claremacrae added scope: edit task The Create or edit task modal/dialog type: internal Only regards development or contributing labels May 6, 2024
Copy link
Collaborator

@claremacrae claremacrae left a comment

Choose a reason for hiding this comment

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

I viewed the final diffs and they made sense. I did a very very quick test that of the dialog and it behaved fine.

Just a minor comment for my own education...

@claremacrae claremacrae merged commit b4f4d3b into obsidian-tasks-group:main May 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: edit task The Create or edit task modal/dialog type: internal Only regards development or contributing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants