Git Product home page Git Product logo

Comments (4)

kwhsiung avatar kwhsiung commented on July 28, 2024

這部分的重構我有計畫要引入 composition api 來輔助,由於 composition api 使用上需要手動 import 相關 function 並透過 setup 來使用,故引入之後不會直接影響既有的 components,可漸進式的使用,所以引入之後應該不會直接破壞目前的系統。

from mirror-media-nuxt.

kwhsiung avatar kwhsiung commented on July 28, 2024

Default listing pages 現有功能紀錄

  • (基本功能)項目列表
    • 列表可自訂大標與顏色
    • 列表項目主圖可自訂輔助文字與顏色
  • (基本功能)無限捲軸 loadmore
  • 廣告
    • GPT: top, bottom, sticky 以及蓋版廣告
    • MicroAd: listing 項目的第 3, 5, 8 個項目為廣告
  • 飲酒警示
  • 搜尋關鍵字大標

Default listing pages 各頁功能列表

https://docs.google.com/spreadsheets/d/1mIcRw-2ehZ0UQv7KjMcQ9vOkCoBqOP6wiLDfmMSmSDA

from mirror-media-nuxt.

kwhsiung avatar kwhsiung commented on July 28, 2024

重構方法

依我個人認為重構後的結果依收斂(需要越少檔案越收斂)程度由小到大排序

目前 default listing pages 測試覆蓋率

---------------------------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------
File                                         | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                                           
---------------------------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------                                                           
 pages/author                                |   63.64 |    67.74 |   79.17 |   63.64 |                                                                             
  _id.vue                                    |   63.64 |    67.74 |   79.17 |   63.64 | 69-75,89,94,155-158,164-176,187-200                                         
 pages/category                              |   74.19 |    71.88 |    87.5 |   74.19 |                                                                             
  _name.vue                                  |   74.19 |    71.88 |    87.5 |   74.19 | 77-80,135,167,195-201,212-225                                                                                                                 
 pages/search                                |   69.05 |    81.08 |   88.89 |   69.05 |                                                                             
  _keyword.vue                               |   69.05 |    81.08 |   88.89 |   69.05 | 27-30,59,123-136                                                            
 pages/section                               |   71.72 |    59.21 |   77.14 |   71.72 |                                                                             
  _name.vue                                  |   72.73 |    71.43 |   88.46 |   72.73 | 60-63,102,153-159,170-183                                                   
  topic.vue                                  |   67.39 |    61.54 |   85.71 |   67.39 | 67-70,84,146-150,161-174                                                    
 pages/tag                                   |   66.04 |    65.52 |   82.61 |   66.04 |                                                                             
  _id.vue                                    |   66.04 |    65.52 |   82.61 |   66.04 | 69-75,89,94,155-161,175-188                                                 
 pages/topic                                 |   60.53 |    70.83 |      80 |   60.53 |                                                                             
  _id.vue                                    |   60.53 |    70.83 |      80 |   60.53 | 37-40,60,99-105,116-129                                                    
---------------------------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------

from mirror-media-nuxt.

yeefun avatar yeefun commented on July 28, 2024

Mixin: fetch-list-and-loadmore.js
Component: ContainerList.vue

from mirror-media-nuxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.