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

feat!: prepare for v4 #539

Merged
merged 33 commits into from
Aug 2, 2024
Merged

feat!: prepare for v4 #539

merged 33 commits into from
Aug 2, 2024

Conversation

brc-dd
Copy link
Member

@brc-dd brc-dd commented Jun 14, 2024

closes #538
closes #424
closes #541

Copy link

netlify bot commented Jun 14, 2024

Deploy Preview for sefirot-docs ready!

Name Link
🔨 Latest commit 010692a
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-docs/deploys/66a0b300e1435e00082a2917
😎 Deploy Preview https://deploy-preview-539--sefirot-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jun 14, 2024

Deploy Preview for sefirot-story ready!

Name Link
🔨 Latest commit 010692a
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-story/deploys/66a0b300e71dbb000858f2aa
😎 Deploy Preview https://deploy-preview-539--sefirot-story.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@brc-dd brc-dd marked this pull request as ready for review June 14, 2024 14:25
@brc-dd brc-dd requested a review from kiaking as a code owner June 14, 2024 14:25
@brc-dd brc-dd marked this pull request as draft June 18, 2024 17:03
@brc-dd brc-dd changed the title feat!: migrate to unplugin-icons feat!: migrate to unplugin-icons and remove deprecated options Jun 18, 2024
@brc-dd brc-dd marked this pull request as ready for review June 18, 2024 19:11
@brc-dd brc-dd marked this pull request as draft June 19, 2024 12:50
@brc-dd brc-dd changed the title feat!: migrate to unplugin-icons and remove deprecated options feat!: prepare for v4 Jun 19, 2024
kiaking
kiaking previously approved these changes Jul 9, 2024
@kiaking kiaking marked this pull request as ready for review July 9, 2024 05:18
@brc-dd
Copy link
Member Author

brc-dd commented Jul 18, 2024

Removed utils

  • isNullish -> == null / != null (note non-strict comparison)
  • isArray -> Array.isArray (search using /(?<!Array\.)isArray/)
  • isFunction -> typeof x === 'function' (other projects are not using it)

vue-tsc will pick these

@brc-dd
Copy link
Member Author

brc-dd commented Jul 18, 2024

Removed components and props

  • SSheet* (mixin is also removed)
  • SIcon - directly use the component or <component :is="IconX" /> (avoid using icon dictionaries, just use v-if/v-else)
    • <SIcon :icon="(I.*?)" -> <$1
    • <SIcon (.*?) :icon="(I.*?)" -> <$2 $1
  • SCardFooter*/SCardHeader* - use SControl* instead
  • text from SActionListItem - (search for ActionList and check if they are all using label not text)

  • Search for ActionList and replace text in items to label.
  • Search for <SCardBlock([^<]|\n)*?space and replace space with utility classes. (This wasn't working even in older versions.)
  • Search for <SPill([^<]|\n)*?tag and replace tag with as.

enable case sensitive mode for regexes in this section

vue-tsc will NOT pick these. manually find and refactor usage

@brc-dd
Copy link
Member Author

brc-dd commented Jul 18, 2024

Removed composables

  • old versions of composables/Data, composables/Form, composables/Validation. Refactor them to useD/useV. When all of such cases are removed, rename useD/useV to useData/useValidation and update imports.

    const { data, validation, init, validateAndNotify } = useForm({
      data: {
        image: null as File | null
      },
      rules: {
        image: {
          maxFileSize: maxFileSize('500kb')
        }
      }
    })
    
    to
    
    const { data, init } = useD({
      image: null as File | null
    })
    
    const { validation, validateAndNotify } = useV(data, {
      image: {
        maxFileSize: maxFileSize('500kb')
      }
    })

vue-tsc will pick these

@brc-dd
Copy link
Member Author

brc-dd commented Jul 18, 2024

Added utils

  • isFetchError (from http/Http)
  • refer docs

@brc-dd
Copy link
Member Author

brc-dd commented Jul 18, 2024

Table changes

Rewrite everything if using legacy code 🫠

  • reset and actions are removed, use corresponding SControl elements.
  • Some types may no longer accept generic parameters. To migrate just leave them and run vue-tsc, it should give error in those files.
  • Individual properties of cells no longer accept getter functions, instead make the whole cell a function.

@brc-dd brc-dd marked this pull request as ready for review July 21, 2024 08:57
@brc-dd brc-dd marked this pull request as draft July 21, 2024 09:06
@brc-dd brc-dd marked this pull request as ready for review July 23, 2024 14:05
@brc-dd brc-dd requested a review from kiaking July 23, 2024 14:09
@brc-dd
Copy link
Member Author

brc-dd commented Jul 24, 2024

Stricter types

Some types were lax like this:

-  unitBefore?: any
-  unitAfter?: any
+  unitBefore?: Component | string
+  unitAfter?: Component | string

Might need to adjust props in such cases.

vue-tsc will pick these

@kiaking kiaking merged commit aceb3d9 into main Aug 2, 2024
9 checks passed
@kiaking kiaking deleted the icons branch August 2, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants