Giter Club home page Giter Club logo

infinite-city's People

Contributors

5u5h1 avatar david0u0 avatar mros avatar pwliao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

pwliao

infinite-city's Issues

個人頁面

點擊用戶名稱時,要能鏈接到一個新頁面,用來顯示該用戶的基本資訊以及它寫過的文章。

個人、看板介紹

每個看板以及個人頁面,都會增加一塊空間,用以撰寫看板的基本資訊或個人的自我介紹

後端看板API設計改良

以現行API,若使用者將一個深度很深的看板加入書籤,則下次點擊時,必須遞迴發出請求,才能一層一層取得欲查詢看板的資料。

因此,希望能有一個API,請求中包含看板的路徑,例如

GET /api/board/**/桌球/抽球

能在伺服器直接搜尋到 **/桌球/抽球 這個看板

原本的API不用移除,往後可被localstorage記錄,用以加速

再論自定義能力與實作方式

先提出一定要實現的場景有哪些:

  1. 控制發文(留言)表單,並給予表單各欄位限制。舉例:電影板想要實現評價功能,並強制讓使用者填寫評價欄位,因此讓使用者一在電影板點擊發文,彈出的發文表單中就有評價欄位,並且此欄位只能填寫1~5(星)。
  2. 在一篇文章中,文章內容、留言要能夠使用函式。舉例:自動統計的投票系統、統計留言中有幾個人推「母豬」。

接着討論此兩場景中遇到的困難或未確定設計之處,並提出解決方式。

場景 1

Q1: 在場景 1 中,我們該如何從自定義的表單中蒐集資料以回傳到伺服器呢?
解法 1 :採用一個 JSX 組件來定義表單,並且必須約定此組件實作一個 getData 函式,以讓其他組件取得它想給出的資料。
解法 2 :進一步限制自定義能力,使用一個形如

[{"name": "XXXXX", "restriction": "function() {}"}]

的格式。
而渲染方式則固定,也就是說無法讓使用者自行做出富文本編輯器、日期選擇器

場景 2

Q1: 函式該如何定義?
解法 1 :每個函式應該吃下一個參數,此參數參照到一個描述整個文章的物件。
解法 2 : 函式吃下的參數可已被指定到更細範圍,如第N個留言的name欄位

Q2: 是否一個表單只能是函式或只能是字串?能否在一個欄位裡僅有一部分是函式,例如「贊成的有N人」,中僅有N是個函式。
解法 1 :只要有這種需求就寫成函式
解法 2 :使用模板(如 JSX 就可實現)

個板功能

用戶發表私人文章時,不需要添加到根看板下的某個節點,可以直接發在個人頁面下。

單頁應用 SEO

在 production 使用 prerender 以渲染頁面給搜尋引擎的爬蟲

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.